I am having problems retrieving distinct records from a XML record. I am using the following code but seem to have the same image in an entire row. Thanks in Advance!
view demo code demo
<?php
$display_number = 15;
$tmp .= '<table width="100%" border="1" cellspacing="1" cellpadding="1">';
for ($i = 1; $i <= $display_number; $i++) { //this is the outer loop
$tmp .= $i;
#$thumb = $data['ysearchresponse']['resultset_images']['result'][$i]['thumbnail_url'];
$tmp .= "<tr>";
$tmp .= "<td>".$i."</td>";
for($j = 1; $j <= 3; $j++) { // inner loop
$thumb = $data['ysearchresponse']['resultset_images']['result'][$i]['thumbnail_url'];
$tmp .= "<td>";
#$tmp .= $i * $j;
$tmp .= '<img src="';
$tmp .= $thumb;
$tmp .= '"/>';
$tmp .= $title;
$tmp .= "</td>";
}
$tmp .= "</tr>";
}
$tmp .= '</table>';
?>