I am so new to this and not a programmer, that I can’t get a script to work that starts a new row after 5 pics. So basically, I want to create a row with 5 columns that starts a new row after I have done 5 columns. Can anyone help? ( I stripped my code back to where it works and it just displays everything in columns…so I have been trying hard.) [COLOR=red]If anyone can just write out the while statement with i++ I will throw $10 in your paypal.[/COLOR] Not trying to be a jerk, just need help.
<?php
$g_user_id = "group_usr";
$g_group_id = "group_id";
mysql_connect($hostname,$username, $password);
mysql_select_db($dbname);
$query = "SELECT * FROM `usr_groups` WHERE $g = $g_group_id ORDER BY $g_group_id DESC limit 15";
$result = mysql_query($query);
if($result)
{
while($row = mysql_fetch_array($result))
{
$group_member = $row["$g_user_id"];
echo "<td><img src=images/users/".$group_member."_small.gif></td>";
}
}
?>