date("a");  > output = AM

Is there any easy way to change the formatting of the output of above from "am" to "a.m." in order to conform to AP style?

Something like this below would work, but I'm wondering if there is something I could do differently in the date() fuction to make it work:

$date = date("a");
if ($date == "am")
{ echo "a.m." }
elseif ($date == "pm")
{ echo "p.m." }

--
Kevin Murphy
Webmaster: Information and Marketing Services
Western Nevada Community College
www.wncc.edu
775-445-3326

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

Reply via email to