Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Set::extract - Parsing An RSS Feed For All Post Titles

DZone's Guide to

Set::extract - Parsing An RSS Feed For All Post Titles

·
Free Resource
// description of your code here
http://www.thinkingphp.org/2007/02/24/cake-12s-set-class-eats-arrays-for-breakfast/

The following code will produce the result:
Array
(
    [0] => How-to: Use Html 4.01 in CakePHP 1.2
    [1] => Looking up foreign key values using Model::displayField
    [2] => Bug-fix update for SVN/FTP Deployment Task
    [3] => Access your config files rapidly (Win32 only)
    [4] => Making error handling for Model::save more beautiful in CakePHP
    [5] => Full content RSS feed
    [6] => Visual Sorting - Some Javascript fun I had last night
) 


uses('Xml');
 
$feed = xmltoArray(new XML('http://feeds.feedburner.com/thinkingphp'));
$postTitles = Set::extract($feed, 'rss.channel.item.{n}.title'); 

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}