AshleyQuick Posted April 28, 2010 Share Posted April 28, 2010 I sorta understand this. Because all the numbers in my example above ... 1 through 25 ... have a semicolon after them, can substr look for the first semicolon, grab it AND the numbers (1-25) before it and subsequently display them in the preceding div? Ideally, it would be nice to remove the semicolon altogether but that's not a necessity... <?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"> <channel> <title>Billboard Christian Songs Chart</title> <link>http://www.billboard.com/</link> <description /> <item> <title>1: All Of Creation, MercyMe</title> <link>http://www.billboard.com/charts/christian-songs</link> <description>All Of Creation by MercyMe ranks #1</description> <category>Christian Songs</category> <pubDate>Sat, 01 May 2010 04:00:00 GMT</pubDate> <guid isPermaLink="false">2010-05-01 00:00:00.0-10549440</guid> </item> </channel> </rss> Because all the numbers in my example above ... 1 through 25 ... have a semicolon after them, can substr look for the first semicolon, grab it AND the numbers (1-25) before it and subsequently display them in the preceding div? Ideally, it would be nice to remove the semicolon altogether but that's not a necessity... echo "<div>The number would be moved to this div.</div>"; echo "<div>"; echo htmlentities($item['title']); echo "</div>"; Link to comment https://forums.phpfreaks.com/topic/200045-separating-data-in-of-xml-feed-to-display-separately-would-substr-work/ Share on other sites More sharing options...
Ken2k7 Posted April 28, 2010 Share Posted April 28, 2010 What semi-colon? I don't see one. Link to comment https://forums.phpfreaks.com/topic/200045-separating-data-in-of-xml-feed-to-display-separately-would-substr-work/#findComment-1049978 Share on other sites More sharing options...
AshleyQuick Posted April 28, 2010 Author Share Posted April 28, 2010 In What semi-colon? I don't see one. In the <title> attribute of the feed ... <title>1: All Of Creation, MercyMe</title> Link to comment https://forums.phpfreaks.com/topic/200045-separating-data-in-of-xml-feed-to-display-separately-would-substr-work/#findComment-1050000 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.