Forum Moderators: coopster
Any help would be greatly appreciated! And thank you in advance!
<?phpmysql_connect("localhost","none","noname");
mysql_select_db("none");
$sale = "0";
$result = mysql_query("SELECT * FROM bedroom WHERE item_sale LIKE '%$sale%'");
$t = "0";
if(mysql_num_rows($result) > 0) {
while($r=mysql_fetch_array($result)) {
$item_number=$r["item_number"];
$item_mfg=$r["item_mfg"];
$item_type=$r["item_type"];
$item_series=$r["item_series"];
$item_pic=$r["item_pic"];
$item_thumb=$r["item_thumb"];
$item_desc=$r["item_desc"];
$items_list=$r["items_list"];
if ( ( browser_detection( 'browser' ) == 'ie' )
&&
( browser_detection( 'number' ) >= 5 ) )
{
if ($t < 3)
{
if ($t=="2")
{
echo "<a href=detail.php?p=$item_number&table=bedroom><img src=$item_thumb border=0></a><br/>";
$t="0";
}
else
{
echo "<a href=detail.php?p=$item_number&table=bedroom><img src=$item_thumb border=0></a>";
$t++;
}
}
}
else
{
echo "<a href=detail.php?p=$item_number&table=bedroom><img src=$item_thumb border=0></a>";
}
}
}
?>
Thank you very much!
I don't understand why you have chosen to make $t a string considering you are doing integer math with it. I suggest making $t = 0; instead of $t = "0"; Then when you compare it to other values use $t==2 instead of $t=="2".
See how this turns out...
eelix