From: "Jon Bennett" <[EMAIL PROTECTED]>

> I'm trying to re-work this code from the php site
> <http://uk.php.net/strtotime> so that my users can input dates in UK
> format (dd-mm-yyyy) and still use strtotime.
>
> // from http://uk.php.net/strtotime
>
> $date=explode("/",trim($records[2]));
> $posted=strtotime ($date[1]."/".$date[0]."/".$date[2]);

If you're going to split the date apart into it's components, why not just
use mktime()? There's no reason that you _need_ to use strtotime(), is
there?

$posted = mktime(0,0,0,$date[1],$date[0],$date[2]);

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to