What is the difference between mysql_fetch_array and
mysql_fetch_object?
Answers were Sorted based on User's Feedback
Answer / subrat
mysql_fetch_array ? Fetch a result row as an associative
ARRAY, a numeric array, or both
mysql_fetch_object ? Fetch a result row as an OBJECT
| Is This Answer Correct ? | 25 Yes | 2 No |
Answer / sumit
mysql_fetch_object : will return the results from database
as objects. fields will be accessible like an objects
i.e $result->name
mysql_fetch_array : will return the results from database as
array. fields will be accessible like in objects
i.e $result[name]
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / jeevabala
mysql_fetch_array : fetch the result as an array
mysql_fetch_object : fetch the result as a object
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / abhay kumar
mysql_fetch_array display all matching record from table as
an array while mysql_fetch_object dispaly first matching
from table as ab object
| Is This Answer Correct ? | 6 Yes | 9 No |
How do you insert a table?
Is mysql good for big data?
What are the differences between innodb and myisam engines?
How to decrement dates by 1 in mysql?
How is oracle different from mysql?
what is mysql optimization in brief?
What is the difference between the DELETE TABLE and TRUNCATE TABLE commands in MySQL?
In how many ways we can retrieve data in the result set of mysql using php?
Use mysqldump to create a copy of the database?
What is memory table in mysql?
How can you find out the version of the installed mysql?
What are the functions of commit and rollback statements?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)