So sprach Fang Li am Fri, Mar 02, 2001 at 06:58:45PM -0500:
> Hi, All,
> I am stucked here.Would you please help as soon as you can?
>
> LiveDate = "Mar 12,2001"
>
> how to convert it to a int?
$months = array( "Jan" => 1,
"Feb" => 2,
...........
"Dec" => 12
);
$month = substr($LiveDate, 3);
$month_num = $months( $month );
$comma = strpos($LiveDate, ",");
$day = substr($LiveDate, 2, $comma - 2);
$year = substr($LiveDate, 4, $comma);
Something like this should work - I'm not too sure about the values for
substr, but it should give you an idea.
Alexander Skwar
--
How to quote: http://learn.to/quote (german) http://quote.6x.to (english)
Homepage: http://www.digitalprojects.com | http://www.iso-top.de
iso-top.de - Die guenstige Art an Linux Distributionen zu kommen
Uptime: 1 day 1 hour 5 minutes
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]