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
How to convert numbers to strings in php?
What is difference between mysqli and mysql?
What is the difference between print() and echo()?
How is the comparison of objects done in php?
What is basename php?
Write a program to get second highest number in an array using php?
How to get a random value from a php array?
What is the difference between myisam and innodb?
Does php pass arrays by reference?
Tell me what is use of in_array() function in php?
What is cURL in PHP?
Tell me what is the use of the function htmlentities?
How many escape sequences are recognized in double-quoted strings?
What is a composer in PHP?
Which is better wamp or xampp?