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]". Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.