I have a database of guitarists birthdays. The birthday is stored in a MySQL DB in DATE format as YYYY-MM-DD. Virtuoso Spanish classical guitarist Andrés Segovia was born on Feb 21, 1893. I would like the PHP output to be "February 21, 1893". When I use the common date output. this date come out as January 1, 1970.
I understand there is a problem with either the DB or PHP understanding dates pre 1900. (I'm a bit of a nube) Through a Google search I am able to get close with this code;
while($row = mysql_fetch_array($result)) { $bday = explode('-',$row['bday']);
$bdayf = $bday[1] .'/' . $bday[2] .'/' . $bday[0] ;
echo "$bdayf";
}
This outputs 02/21/1893. But I can't get it the final mile and get it to output as February 21, 1893. I have to beilive this a common problem but I cannot find a clear answer.
I thank anyone in advance for your help.
Nick Paonessa