What is the difference between mysql_fetch_object and
mysql_fetch_array?

Answer Posted / shesh

mysql_fetch_object.....it return result as a object like
$result->name;
$result->city;

mysql_fetch_array.....it return result as a assiciative
array like
$result['name'];
$result['city'];

Is This Answer Correct ?    19 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the latest version of php?

540


What is array filter in php?

557


How can you get web browser’s details using PHP?

522


How can a cross-site scripting attack be prevented by php?

539


What is ci framework in php?

503






What are the difference between overloading and overriding in oops?

544


How do I stop a php script?

503


Difference between $message vs. $$Message in php.

589


Explain a resource?

614


What is the use of mysql_fetch_array in php?

511


What is the use of htmlspecialchars in php?

526


Which character is used to match exactly one character?

552


What is data type in php?

528


What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?

622


What is an abstract class in php?

482