margins in using php to conusme rss feed- a rookie needs help!

Posted by tim on Stack Overflow See other posts from Stack Overflow or by tim
Published on 2010-05-24T13:17:45Z Indexed on 2010/05/24 13:21 UTC
Read the original article Hit count: 274

Filed under:
|

I am very rookie at php

have a code to display an rss feed but there is a big space between each item (the title/date and description) is it possible to eliminate those margins ??

 <?php

$feed = simplexml_load_file('http://online.wsj.com/xml/rss/3_7031.xml', 'SimpleXMLIterator'); $first3 = new LimitIterator($feed->channel->item, 0, 4); foreach ($first3 as $item) { echo "link'target='_blank'>$item->title"; preg_match('/(?:\w{3},\s)?\d{1,2}\s\w{3}\s\d{2,4}/', $item->pubDate, $m); echo isset($m[0]) ? "$m[0]" : '';echo "$item->description";

} ?>

© Stack Overflow or respective owner

Related posts about php

Related posts about rss