Good people and the following I have a photo upload that is working fine, I'm just trying to see the problem in displaying all the photos through for
, there always appears an image just needs yours to find out where the problem.
Code
// MOSTRA FOTOS DO POST
$result_anexo_post = mysql_query("SELECT * FROM posts_anexos WHERE post_id = '".$row_posts->id_post."' AND seccao='fotos_posts'");
$num_fotos = mysql_num_rows($result_anexo_post);
for ($i=0;$i<$num_fotos;$i++) {
$row_anexo_post = mysql_fetch_assoc($result_anexo_post);
$fotos_post = '<img src="../php/timthumb.php?src=gtm/anexos/posts_fotos/'.$row_anexo_post['id_anexo'].'.'.$row_anexo_post['tipo'].'&h=100&w=100&zc=1" alt="">';
}
No% w / w where to display all images is as soon as it is inside an array which is then returned via ajax to list on the page.
<div style="float:left; margin:0px 5px 10px 0px;">'.$fotos_post.'</div>