what is the difference between mysql_fetch_array() and
mysql_fetch_row()?

Answer Posted / tarun singhal

mysql_fetch_array: returned a row from recordset as a
numeric and/or associative array.

mysql_fetch_row: returned a row from recordset as numeric array.

example:
$con=mysql_connect("localhost","root","root");
$sql = "select * from member where id=1";
$result=mysql_query($sql,$con);
print_r(mysql_fetch_array($result));
print_r(mysql_fetch_row($result));

Is This Answer Correct ?    38 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the value of the variable input is a string 1,2,3,4,5,6,7. How would you get the sum of the integers contained inside input?

564


What is php form validation?

546


Who is the father of php?

554


What is list function with their uses.

523


What is the purpose of using php?

496






What is session_register()?

554


Tell me what is the difference between ereg_replace() and eregi_replace()?

539


How to create a web form?

541


How do you create an array in php?

538


How to implement a class named dragonball. This class must have an attribute named ballcount (which starts from 0) and a method ifoundaball. When ifoundaball is called, ballcount is increased by one. If the value of ballcount is equal to seven, then the message you can ask your wish is printed, and ballcount is reset to 0. How would you implement this class?

621


What is the meaning of "enctype= multipart/form-data" ?

523


What is a php class?

528


What are the difference between array_keys() and array_key_exists() in php?

533


Explain me what is x+ mode in fopen() used for?

536


How do you end php?

504