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


Please Help Members By Posting Answers For Below Questions

Is empty java?

527


How can I display text with a php script?

467


Explain how to execute a php script using command line.

552


Which php framework is best for web development?

491


Why do we use inheritance in php?

523






Explain the difference b/w static and dynamic websites?

489


How can we access the data sent through the url with the get method?

587


What is the current stable version of php? What advance thing in php7?

506


How to open a file for writing?

557


What is boolean in php?

521


What is the difference between $message and $$message in php?

417


Is php worth learning in 2019?

505


How can we execute a php script using command line?

512


Tell us how to redirect a page in php?

533


What is mvc? Why its been used?

503