Kousky PHP: Porovnání verzí

Z Znalosti
m
m
Řádek 3: Řádek 3:
  
 
=== Copyright ===
 
=== Copyright ===
Pramen např. [https://stackoverflow.com/questions/64003/how-do-i-use-php-to-get-the-current-year How do I use PHP to get the current year?]
+
Prameny např.
 +
*[https://stackoverflow.com/questions/64003/how-do-i-use-php-to-get-the-current-year How do I use PHP to get the current year?]
 +
*[https://css-tricks.com/snippets/php/automatic-copyright-year/ Automatic Copyright Year]
  
 
Jednoduché:
 
Jednoduché:

Verze z 30. 12. 2020, 10:52

Sem ukládám různé užitečné kousky kódu PHP.

Copyright

Prameny např.

Jednoduché:

&copy; 2013-<?= date("Y"); ?> Autor

Složitější:

&copy; <?php echo 2013 != date('Y') ? '2013 - ' . date('Y') : 2013; ?> Autor

Štítky: PHP copyright