I am retireiving date strings in the form Y-m-d from a mySQL table (ex. 2010-12-03) using an array $row[dt];
echo $row["dt"]; // in a while loop
I would like output that stored string as “Mar 2nd”
I have tried strtotime() and date( "m d", $row['dt'] ) but they don’t work.. the latter, for instance, just outputs “Dec 31”
can this be done? thanks
I believe this is the answer you are looking for. The reason for the
jinstead of thedis because the poster asked for Mar 2nd. Usingdwould output Mar 02nd.Edit: M instead of m.