Missing SimpleXML Parsing

obozy7

New Member
\[code\]<?php// load SimpleXML$entry = new SimpleXMLElement('http://bit.ly/c3IqMF', null, true);echo <<<EOF<table> <tr> <th>Title</th> <th>Image</th> </tr>EOF;foreach($entry as $item) // { echo <<<EOF <tr> <td>{$item->title}</td> <td><img src="http://stackoverflow.com/questions/3593810/{$item->children('im', true)->image}"></td> </tr>EOF;}echo '</table>';?>\[/code\]The above php works but somehow, I got 8 empty table entities above the result\[code\]<tr> <td></td> <td><img src=""></td> </tr>\[/code\]What's wrong with the code? How do I get rid of the empty table entities?
 
Back
Top