note 114126 added to function.date

From: Date: Tue, 14 Jan 2014 07:45:11 +0000
Subject: note 114126 added to function.date
Groups: php.notes 
Request: Send a blank email to php-notes+get-198229@lists.php.net to get a copy of this message
If you want to print something like: Tuesday, the 14th of January, 2014 Use this: <?php echo date("l", strtotime("now")).', the'.date(" jS", strtotime("now")).' of'.date(" F, Y", strtotime("now")); ?> This is because you cannot use words in the date string. If you use words in the date string it will be seen as a format character So if you use: <?php echo date("l, the jS of F, Y", strtotime("now")); ?> It will print something like: Tuesday, 3108Europe/Berlin 14th 2014f January, 2014 ---- Server IP: 113.20.13.217 Probable Submitter: 197.71.93.27 ---- Manual Page -- http://php.net/manual/en/function.date.php Edit -- https://master.php.net/note/edit/114126 Del: integrated -- https://master.php.net/note/delete/114126/integrated Del: useless -- https://master.php.net/note/delete/114126/useless Del: bad code -- https://master.php.net/note/delete/114126/bad+code Del: spam -- https://master.php.net/note/delete/114126/spam Del: non-english -- https://master.php.net/note/delete/114126/non-english Del: in docs -- https://master.php.net/note/delete/114126/in+docs Del: other reasons-- https://master.php.net/note/delete/114126 Reject -- https://master.php.net/note/reject/114126 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#198229) next »