what is the difference between mysql_fetch_array() and
mysql_fetch_row()?
Answer Posted / guru
Mysql_fetch_array():
Mysql_fetch_array() returns row as an associative, numeric array or both based on parameters passed in it. Three types of parameters can be passed in mysql_fetch_array function.
1. MYSQL_BOTH - return both associative and numeric array
2. MYSQL_ASSOC - return associative array
3. MYSQL_NUM - return numeric array
Reference:http://www.phponwebsites.com/2014/03/php-mysql-fetch-array.html
Mysql_fetch_row():
It return row as numeric array. We can't use associative indices to retrieve data from mysql table using php.
Reference: http://www.phponwebsites.com/2014/03/php-mysql-fetch-row.html
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is session data?
Tell me in php, objects are they passed by value or by reference?
What is the use of print_r function in php?
How do you end a session in php?
What is the main difference between require() and require_once()?
Write a query to find the 2nd highest salary of an employee from the employee table?
Which is better #define or enum?
Explain the difference between array_merge() and array_combine()?
What is difference between Method overriding and overloading in PHP?
How to open standard output as a file handle?
What difference between require() and require_once()?
How can I use single quotes in single quotes in php?
What are PHP Magic Methods/Functions. List them.
Which function you can use in php to open a file for reading or writing or for both?
How to track no of user logged in?