ResumesInn
Welcome  ,
Interview Questions >> PHP >> What is the difference between mysql_fetch_object and mysql_fetch_array ?
Next Question Previous Question

What is the difference between mysql_fetch_object and mysql_fetch_array ?



  Prasanjeet Ghosh wrote ...
MySQL fetch object will collect first single matching record
 where
 mysql_fetch_array will collect all matching records from the table in an array.
  Joseph Ranjan wrote ...
mysql_fetch_object() : Function will return the results from database as objects. 

Fields will be accessible like in objects

i.e $res->id,$res->name

mysql_fetch_array() : will return the results from database as array.

Fields will be accessible like this ...

i.e $res[id],$res[name]


Login to write answer for this question !
Want to place your ads in this website ?
50USD Per Month for single placement. Contact Us
All Rights Reserved . Developed by SJRANJAN