So I'm attempting to format mySQL timestamps and I've tried the date() and strftime() functions in PHP except they're based on UNIX timestamps and mySQL isn't so I get the wrong values. The mySQL format is: YYMMDDHHMM
my timestamp is called like this:
$row[timestamp]
Example of the output is here:
http://www.calstudents.com/reviews/list2.php?school=UCB&course_title=&course_number=&prof_name=&Submit=Submit+Query
I was given this solution...but I'm not quite sure what to do with it..
if (ereg("([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})", $row[timestamp], $matches))
{ list($yy, $mm, $dd, $hh, $mins) = $matches; }
How do I use this to output the timestamp???