Difference between revisions of "Kousky PHP"
From Znalosti
m |
m |
||
| (6 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
=== Copyright === | === Copyright === | ||
| − | + | 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] | ||
| + | *[https://thisinterestsme.com/get-current-year-php/ Getting the current year using PHP] | ||
Jednoduché: | Jednoduché: | ||
| − | © 2013-<?= date("Y"); ?> | + | &copy; 2013-<?= date("Y"); ?> Autor |
Složitější: | Složitější: | ||
| − | © <?php echo | + | &copy; <?php echo 2013 != date('Y') ? '2013 - ' . date('Y') : 2013; ?> Autor |
| − | |||
{{Tags}} PHP copyright | {{Tags}} PHP copyright | ||
Latest revision as of 10:54, 30 December 2020
Sem ukládám různé užitečné kousky kódu PHP.
Copyright
Prameny např.
- How do I use PHP to get the current year?
- Automatic Copyright Year
- Getting the current year using PHP
Jednoduché:
© 2013-<?= date("Y"); ?> Autor
Složitější:
© <?php echo 2013 != date('Y') ? '2013 - ' . date('Y') : 2013; ?> Autor
Štítky: PHP copyright