PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
include'global.php';
$result=mysql_query("SELECT * FROM articles ORDER BY id LIMIT 20");
$row = mysql_fetch_array($result);
while($row){
echo $title=$row['title'],$name=$row['name'];
}
?>
It brings a long result after a long time ( so long that IE cannot browse it and I have to use firefox)
in addition, the result is not what I need. I need the title of 20 last post articles
Because there is only one mysql_fetch_array before the while loop the script is fetching only the first record and processes it again and again and again ...