icor1031 Posted September 18, 2014 Share Posted September 18, 2014 I posted this on stackoverflow, but no one wanted to touch it. http://stackoverflow.com/questions/25903927/mysql-reverse-new-entries I've tried array_push, but the results remain as SimpleXML, and not a plain array, which I wasn't able to use. I tried some other things that I can't remember. $feed_url = 'http://feeds.feedburner.com/SlickdealsnetFP?format=xml'; $contents = file_get_contents($feed_url); $x = new SimpleXMLElement($contents); $arrayFPTitle=array(); foreach($x->channel->item as $temp){ array_push($arrayFPTitle, $temp->title); } Have any suggestions?... I've been on this problem for a few hours, now. I even tried regex, but you can imagine I quickly realized I wasn't going to figure that out. Link to comment https://forums.phpfreaks.com/topic/291143-harder-question-reverse-sql-entries/ Share on other sites More sharing options...
mac_gyver Posted September 18, 2014 Share Posted September 18, 2014 i didn't look at the specific data, but the following should work - array_push($arrayFPTitle, (string)$temp->title); // cast the element as a string Link to comment https://forums.phpfreaks.com/topic/291143-harder-question-reverse-sql-entries/#findComment-1491484 Share on other sites More sharing options...
icor1031 Posted September 18, 2014 Author Share Posted September 18, 2014 Beautiful, thank you! Link to comment https://forums.phpfreaks.com/topic/291143-harder-question-reverse-sql-entries/#findComment-1491488 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.