note 20420 added to function.split
| From: | James at reftech dot co dot uk | Date: | Wed, 03 Apr 2002 12:12:13 +0000 |
| Subject: | note 20420 added to function.split | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28537@lists.php.net to get a copy of this message | ||
A slightly better Apache CLF date splitter than the note under 'strtotime';
$apachedate = "26/Mar/2002:15:22:19 +0000";
list ($date[day], $date[month], $date[year], $date[hour], $date[minute], $date[second],
$date[offset]) = split('[/: ]', $apachedate);
The above builds an array that you can play with fairly elegantly, but note that the month is
returned as a TLA (Three Letter Abbreviation).
--
http://www.php.net/manual/en/function.split.php
http://master.php.net/manage/user-notes.php?action=edit+20420
http://master.php.net/manage/user-notes.php?action=delete+20420
http://master.php.net/manage/user-notes.php?action=reject+20420