note 117867 added to function.date
| From: | akshayinbox at gmail dot com | Date: | Sun, 23 Aug 2015 18:46:56 +0000 |
| Subject: | note 117867 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-203421@lists.php.net to get a copy of this message | ||
When using date(), be sure to "double-escape" certain characters, for example, if printing
the word "at", double escape "t" otherwise it will be treated as "tab"
simply leading to a space being inserted.
Example:
<?php echo "Last updated ".date("M j<\s\u\p>S</\s\u\p\>, Y \a\\t h:i
A"); ?>
will output
Last updated Aug 23rd 2015 at 2:47 PM
(assuming today is Aug 23rd 2015 and it is 2:47 PM)
----
Server IP: 72.52.91.14
Probable Submitter: 2601:43:2:bd9f:d0de:dd28:fa09:594c
----
Manual Page -- http://php.net/manual/en/function.date.php
Edit -- https://master.php.net/note/edit/117867
Del: integrated -- https://master.php.net/note/delete/117867/integrated
Del: useless -- https://master.php.net/note/delete/117867/useless
Del: bad code -- https://master.php.net/note/delete/117867/bad+code
Del: spam -- https://master.php.net/note/delete/117867/spam
Del: non-english -- https://master.php.net/note/delete/117867/non-english
Del: in docs -- https://master.php.net/note/delete/117867/in+docs
Del: other reasons-- https://master.php.net/note/delete/117867
Reject -- https://master.php.net/note/reject/117867
Search -- https://master.php.net/manage/user-notes.php