Current course:

PHP - mysql_fetch_object()


The code

$query = mysql_query("SELECT first, last FROM students");
while($row = mysql_fetch_object($query)) {
      echo $row->first . "<br />";
}