What is the difference between mysql_fetch_array() and mysql_fetch_assoc()?



What is the difference between mysql_fetch_array() and mysql_fetch_assoc()?..

Answer / Sandeep Tiwari

mysql_fetch_array() returns an associative array, a numeric array, or both depending on the mysqli_num_rows() function call before the fetch. mysql_fetch_assoc(), however, only returns an associative array where the keys are the column names.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

what will do ceil() and floor() in PHP?

5 Answers  


how can I use bread crumb in PHP ?

2 Answers  


Tell me what is the difference between exception::getmessage and exception::getline?

1 Answers  


What is difference between static and final in php?

0 Answers  


What does $_cookie means?

1 Answers  


How to find a length of a string in php?

1 Answers  


What is the difference between the functions unlink and unset?

8 Answers   Small Firm, TCS,


How can we destroy the session, how can we unset the variable of a session?

5 Answers  


how to overcome server time behind twleve hours compare to local system time

0 Answers  


Explain how can we increase the execution time of a php script?

1 Answers  


What are the main error types in php and how do they differ?

1 Answers  


Is empty java?

1 Answers  


Categories