Jump to content

formating date format 2009-03-02T14:19:00.003Z


ldoozer

Recommended Posts

Thanks v much - I have used it like this below... but now its returning Thursday 1st January 1970 for every post. I am a complete novice so sorry for my ignorance.

 

<?php
			define('MAGPIE_DIR', 'magpie/');
			require_once(MAGPIE_DIR.'rss_fetch.inc');

			$num_items = 10;
			$rss = fetch_rss( 'http://care4air.blogspot.com/rss.xml' );	
			print_r();
			$items = array_slice($rss->items, 0, $num_items); 

			//display latest blog content:
			foreach ($items as $item) {
			$published = $item['published'];
			$content = $item['atom_content'];
			//$author = $item['author_name'];

			$fDate = date('l jS F Y',strtotime('$published'));

			echo "<h2 id=\"news_story\">$fDate</h2>\n";
			echo "<p>$content</p>\n";
			//echo "<p>$author</p>\n";
			echo "<hr />\n";
			}
		?> 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.