Eksik SimpleXML Ayrıştırma

0 Cevap php
<?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="{$item->children('im', true)->image}"></td>       
        </tr>

EOF;
}
echo '</table>';
?>

Yukarıdaki php çalışır ama her nasılsa, ben sonuç yukarıdaki 8 boş tablo varlıkları var

<tr>
            <td></td>
            <td><img src=""></td>       
    </tr>

Ne kodu ile yanlış? Nasıl boş masa kişilerin kurtulurum?

0 Cevap