Move to next record in array.
Posted: Fri Aug 04, 2006 3:07 pm
I have an SQL query with 3 records.
In this code, there are three rows to be displayed
echo $row['550img'];
echo $row['272img'];
echo $row['272img'];
What I need to happen is have it move to the next record for each of these.
So the 550img would be from record 1, the 272img from record 2, and the second 272img from record 3.
In asp I would use soemthing like recordset.movenext
In this code, there are three rows to be displayed
echo $row['550img'];
echo $row['272img'];
echo $row['272img'];
What I need to happen is have it move to the next record for each of these.
So the 550img would be from record 1, the 272img from record 2, and the second 272img from record 3.
In asp I would use soemthing like recordset.movenext
Code: Select all
<?
$row = mysql_fetch_array($result);
echo "<table width='100%' border='0' cellspacing='5' cellpadding='0'>
<tr align='center'>
<td colspan='2'><a href='bigjohn.html'><img src='";
echo $row['550img'];
echo "' width='550' height='200' border='0'></a> </td>
</tr>
<tr>
<td width='50%' align='right'>
<a href='naturerangers.html'><img src='";
echo $row['272img'];
echo "' width='272' height='99' border='0'></a></td>
<td width='50%' align='left'><a href='tvproduct.php?prodid=1'><img src='";
echo $row['272img'];
echo "' width='272' height='99' border='0'></a></td>
</tr>
</table>";
?>
<br>