ILYAS415 Posted February 9, 2008 Share Posted February 9, 2008 Just out of curiosity, is there a MAJOR difference between the functions... mysql_fetch_array($sql); and mysql_fetch_object($sql); Id like to know because i use the mysql_fetch_object and i can see a majority of people use the array one. p.s. i no that mysql_fetch_object uses "$var->tablecolumn" and mysql_array uses "$var[0]". Link to comment https://forums.phpfreaks.com/topic/90268-basic-question-on-differences/ Share on other sites More sharing options...
Daniel0 Posted February 9, 2008 Share Posted February 9, 2008 Just use whichever you prefer. There is a "major" difference which is the difference between an object and an array, I'm not quite sure what you mean by that. Check the two functions' manual pages. Link to comment https://forums.phpfreaks.com/topic/90268-basic-question-on-differences/#findComment-462782 Share on other sites More sharing options...
phpSensei Posted February 9, 2008 Share Posted February 9, 2008 mysql_fetch_object — Fetch a result row as an object http://fr.php.net/mysql_fetch_object An Object http://ca3.php.net/zend-engine-2.php mysql_fetch_array — Fetch a result row as an associative array, a numeric array, or both http://fr.php.net/mysql_fetch_array Link to comment https://forums.phpfreaks.com/topic/90268-basic-question-on-differences/#findComment-462786 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.