hello to all,
I wrote a foreach() loop and inside I added a variable which also increase but not as with the array that run in the foreach(), but somehow the for each also increases my variable:
$n = 0;
while($row = mysql_fetch_row($GetItems)){
echo "$n<tr>";
foreach($row as $cell){
if(strstr($cell,"Images")){
echo "<td><img src='$cell' hight='150px' width='150px'><input name='storeid' type='hidden' value='$StoreArr[$n]'></td>";
}
else{
echo "<td><a href='".$_SERVER['PHP_SELF']."?ShowAct=true&Item=".$row['0']."&store=".$StoreArr[$n]."&OnBid=true'>$cell</a></td>";
}
}//end_foreach
echo "</tr>\n";
$n++;
}
the "$n" is givin me the next output : 0 1 0 1
and I planned it to be 0 0 1 1.
any help will be appreciated