<?PHP
$result = mysql_query("SELECT depoimento, nome from depoimentos WHERE avaliado = '1'");
$i = 0;
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$i= $i+1;
if ($i > 1) {
printf("<div style='display:none' id='$i'>%s<br><br><i>%s</i></div>", $row[0], $row[1]);
}else{
printf("<div style='display:block' id='$i'>%s<br><br><i>%s</i></div>", $row[0], $row[1]);
}
}
?>
It is showing only the first result (first result = ($i = 1)). All results after the first($i > 1) it is DISPLAY:NONE. What I need: After 5 seconds the first result disapear (display:none) and the second appears (display:block) and then third, etc...
Its showing coments on the website but it must show only 1 coment per time.
I know it needs javascript but i NEVER used it in my life and im not getting success with my searches on web.