I'm having problem with this code i can't describe the problem, that is my code:
[PHP]<?php
$announce = mysql_query("SE LECT * FROM announce LIMIT 4");
while($key = mysql_fetch_ass oc($announce)){
echo '<td style="border:# 999999 solid 1px;"><center>' .$key['Title'].'</center></td>';
}
?>
</tr>
<tr>
<?php
while($key = mysql_fetch_ass oc($announce)){
for($i=1;$i<=3; $i++){
$PicArray = 'Pic'.$i;
if($key[$PicArray]!=''){
$PicType = explode(',',$ke y[$PicArray]);
$tum = $PicType[1];
if(is_file($tum )){
echo '<td style="border:# 999999 solid 1px;"><center>< img src="'.$tum.'"/></center></td>';
break;
}
}
}
}
?>[/PHP]
in this code to solve it i have to call this function again in the second row why?
[PHP]$announce = mysql_query("SE LECT * FROM announce LIMIT 4");[/PHP]
[PHP]<?php
$announce = mysql_query("SE LECT * FROM announce LIMIT 4");
while($key = mysql_fetch_ass oc($announce)){
echo '<td style="border:# 999999 solid 1px;"><center>' .$key['Title'].'</center></td>';
}
?>
</tr>
<tr>
<?php
while($key = mysql_fetch_ass oc($announce)){
for($i=1;$i<=3; $i++){
$PicArray = 'Pic'.$i;
if($key[$PicArray]!=''){
$PicType = explode(',',$ke y[$PicArray]);
$tum = $PicType[1];
if(is_file($tum )){
echo '<td style="border:# 999999 solid 1px;"><center>< img src="'.$tum.'"/></center></td>';
break;
}
}
}
}
?>[/PHP]
in this code to solve it i have to call this function again in the second row why?
[PHP]$announce = mysql_query("SE LECT * FROM announce LIMIT 4");[/PHP]
Comment