What is the difference between mysql_fetch_object and
mysql_fetch_array?

Answer Posted / priya ranganathan

mysql_fetch_object : will return the results from database
as objects. fields will be accessible like in objects
i.e $result->name,$result->cust_name

mysql_fetch_array : will return the results from database as
array. fields will be accessible like in objects
i.e $result[name],$result[cust_name]




Is This Answer Correct ?    139 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which of the delimiter is ASP style?

619


How is php different from other languages?

477


Which framework is best for php?

501


What are the encryption functions in php?

560


What are objects in php?

522






Which is better php or nodejs?

516


What does explode do in php?

549


A process can run only in the background. State Whether True or False?

620


What is an example of a variable?

538


What is the use of strip_tags() method?

545


How can I embed a java program in php file and what changes have to be done in php.ini file?

510


What is lamp in php?

531


What is use of count() function in php?

563


How to include a file code in different files in php?

510


What is a session in php?

566