mysql_fetch_object and mysql_fetch_array in php

mysql_fetch_object returns the database as objects while mysql_fetch_array returns as an array. This will allow access to the data by the field names. 
example of mysql_fetch_object 

<?php
mysql_connect
("hostname""user""password");
mysql_select_db("db");
$result mysql_query("select * from content");
while (
$res mysql_fetch_object($result)) {
    echo 
$res->username;
    echo 
$res->place;
}
mysql_free_result($result);
?>

example of mysql_fetch_array


<?php
mysql_connect
("hostname""user""password");
mysql_select_db("db");
$result mysql_query("select * from content");
while ($res= mysql_fetch_array($resultMYSQL_ASSOC))
 {
 echo $res[0];
}
?>