Difference between revisions of "Kousky PHP"

From Znalosti
m
m
Line 3: Line 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é:

Revision as of 10:52, 30 December 2020

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