note 45508 added to function.strtotime

From: Date: Thu, 09 Sep 2004 12:48:37 +0000
Subject: note 45508 added to function.strtotime
Groups: php.notes 
Request: Send a blank email to php-notes+get-76318@lists.php.net to get a copy of this message
Just a follow up to "me at samscam dot co dot uk" British date massager, there's a typo in the code snippet ($temparr was set with the new date rather than $ourdate) - working code therefore is: if (preg_match("/\d{1,2}\/\d{1,2}(\/\d{2,4})?/",$ourdate)){ $temparr=explode("/",$ourdate); $ourdate=$temparr[1]."/".$temparr[0]; // re-assemble the first part of the date if ($temparr[2]){$ourdate.="/".$temparr[2];} // Add the year if used } ---- Manual Page -- http://www.php.net/manual/en/function.strtotime.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45508 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45508&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45508&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76318) next »