Trying to format my rss with the RFC822 format using php but for some reason having a little difficulty making each "item" take on it's own time from the date listed in the database, when trying to format it using date("r").
I have a compilation of items with times like:
$item->ItemDate; //which prints "Thursday, September 15, 2011 5:00 PM" format
I try using:
date("r", $item->ItemDate)
but prints every item like: "Wednesday, December 31, 1969 4:33 PM" and gives every item the same date even when contained within a foreach statement.
The slimmed down code looks as follows for the item:
<?php
foreach($items as $item) {
?>
<item>
<pubDate><?=date("r", $item->ItemDate)?></pubDate>
</item>
<?php
}
?>
So, not really sure why each item would print out all the dates like "Wednesday, December 31, 1969 4:33 PM", any thoughts?