note 23585 added to function.substr
| From: | k dot hellinx at pandora dot be | Date: | Tue, 23 Jul 2002 09:28:39 +0000 |
| Subject: | note 23585 added to function.substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-33410@lists.php.net to get a copy of this message | ||
A comment on the previous comment :p
This is even a better way to do that:
function manipulatedate($str)
list($year, $month, $day) = split("\/", $str);
echo $day."/".$month."/".$year
}
Now just use manipulatedate("year/month/day") to get 'your' date ...
In this function, there are few chars what speeds up the loading time (on a good server this
isn't noticable, but who knows :p), but the best part of my function is that you don't
need to HAVE (you still can ...) a zero before your month or day if it exists only of one char ...
Normally it should work better ...
Greetzzz,
Nullius
--
http://www.php.net/manual/en/function.substr.php
http://master.php.net/manage/user-notes.php?action=edit+23585
http://master.php.net/manage/user-notes.php?action=delete+23585
http://master.php.net/manage/user-notes.php?action=reject+23585