The PHP date()
method needs a timestamp, so convert your mysql date string to a timestamp first using strtotime()
:
date("M j Y", strtotime(mysql_result($recordset, $i, 'date_started')));
Or better yet, format your date in your mysql query directly using DATE_FORMAT
. You don't really even need PHP to do this.