Formatting the date below is not working. The date_published after the echo date_published is in this format: Sat, 15 Sep 2012 10:10:37 -0400
The second echo, echoes nothing.
$date_published = $abc[$z]['pubDate'];
echo $date_published;
$date_published = date('Y-m-d H:i:s',$date_published);
echo $date_published;
Use
strtotime()$date_published = date('Y-m-d H:i:s',strtotime($date_published));date()expects a unix timestamp as the second parameter.