automatic years php
© <?php echo date("Y"); ?><?php function auto_copyright($year = 'auto'){ ?>
<?php if(intval($year) == 'auto'){ $year = date('Y'); } ?>
<?php if(intval($year) == date('Y')){ echo intval($year); } ?>
<?php if(intval($year) < date('Y')){ echo intval($year) . ' - ' . date('Y'); } ?>
<?php if(intval($year) > date('Y')){ echo date('Y'); } ?>
<?php } ?>
<?php auto_copyright(); // 2011?>
<?php auto_copyright("2010"); // 2010 - 2017 ?>© 2008-<?php echo date("Y"); ?> // 2008-20??
Also in PHP:
- exclude php
- array value exists php and get key
- config cache clear laravel
- @foreac laravel
- add column to migration laravel
- cmd download file
- artisan route list
- create random alphanumeric php
- Class 'Intervention\Image\ImageServiceProvider' not found
- check array for duplicate values php
- find string in string in php
- Laravel DB facade relations
- drop column migration laravel
- convert string into non capital letters php
- clear cache command line laravel
- array_reverse in php example
- check if id is in key array php
- destroy session php
- creat quik laravel app
- all php exception
- @ in php to supress error in php
- datetime to string php
- create seede for table in laravel
- datetime mysql php