MySQL Fetch_Array VS. Fetch_Object
| From: | Bryan Gintz | Date: | Wed, 30 Jan 2002 18:48:32 +0000 |
| Subject: | MySQL Fetch_Array VS. Fetch_Object | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-82783@lists.php.net to get a copy of this message | ||
Does anyone know what the pros and cons of using mysql_fetch_object vs. mysql_fetch_array.
I find it easier to use the object version because you dont have to code any extra statements to put them into regular variables.
print "$obj->field_name";
as opposed to
$field_name = $row["field_name"];
print "$field_name";
Im just curious to see if there are any problems (resources, etc) that come with using the object method???