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 are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?
What is file upload?
How many types of session are there?
What is the function of string in c?
What is the use of header() function in PHP? What the Limitation of HEADER()?
How to remove leading and trailing spaces from user input values in php?
Tell us how to set cookies in php?
Does apache use php?
What the difference between the 'bitwise and' operator and the 'logical and' operator?
How to return a value back to the function caller?
Explain what does $_server means?
Tell me what are the __construct() and __destruct() methods in a php class?
What are the special characters you need to escape in single-quoted stings?
What is php.ini & .htacess file?
What is overloading and overriding in oop?