|
Posted by Krustov on 10/17/07 12:35
<comp.lang.php>
<Colleen Robledo, MLIS>
<Tue, 16 Oct 2007 07:42:28 -0000>
<1192520548.186275.44610@e9g2000prf.googlegroups.com>
> I'm still pretty new to PHP and MySQL, and have a PHP scripting
> question.
>
> If I'm querying DATE info from a MySQL database, and displaying it
> with PHP echo statements... is there a PHP script I can use to convert
> the DATE data to standard calendar format?
>
> Example:
>
> 2007-10-12 displayed as October 12, 2007
>
<?php
$lager="2007-10-12";
$beer=explode('-',$lager);
$drink=date("F-d-Y",mktime(0,0,0,$beer[1],$beer[2],$beer[0]));
print "The converted date is $drink <br>";
?>
--
www.vhit.co.uk
www.jpgimage.co.uk
www.phpwhois.co.uk
www.cannabiswindow.co.uk
Navigation:
[Reply to this message]
|