Date formatting in a foreach echo
-
Hi Everyone,
It echos the post date but I need to format it. The date looks like this: 2010-11-17 21:05:00
But I need it to look like this: Oct 14 6:45pm$number_recents_posts = 5; $recent_posts = wp_get_recent_posts( $number_recents_posts ); foreach($recent_posts as $post){echo '<li><a href="' .get_permalink($post["ID"]). '" title="Look '.$post["post_title"].'" >' .$post["post_title"].'</a><p>'.$post["post_date"].'</p></li>' ;}
I really appreciate your help…
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Date formatting in a foreach echo’ is closed to new replies.