after calling an array, how do i do different each row?
i would like to show the first image in the gallery and hide the other images
<?php
$query = "SELECT * FROM residential, res_images WHERE residential.id = $id AND prop_id = $id";
$result = @mysqli_query ($db, $query);
$num_rows = mysqli_num_rows($result);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$path = "archive/res/$id";
$image_name = $row['image_name'];
if (blah blah) {
echo "<a href='$path/$image_name' rel='lightbox-test'><img src='$path/$image_name' width='140px' /></a>";
} else {
echo "<a href='$path/$image_name' rel='lightbox-test' class='hidden'></a>";
}
}
mysqli_free_result ($result);
mysqli_close($db);
?>