Rob Ryan posed this problem:
I am beginning to understand some bits of this stuff, but not nearly enough, and so I bang my head against things until my head hurts and I go looking for help. This is one of those times.
I’m trying to use simpleXML to process a feed from uvmbored and put it on a web page.
My only real issue is with the date. Rather than printing something like
Mon, 05 Nov 2012 09:00:00 -0400
I’d prefer something more like
Monday, November 5 at 9:00 AMI suspect the PHP date_parse or date_parse_from_format function may be the ticket here, but I can’t get the syntax right (or something)–I’ve not had any luck. can you make some suggestions?
$date=$item->pubDate; $test= new DateTime($date); $mydate=$test->format("l, F j a\t g:i A"); $title=$item->title; print "$mydate: $title$descript n";
The trickiest bit was getting the ‘ at ‘
Rob’s response: “A thing of beauty; thanks.”