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
What is the use of rand() in php?
Why sessions are used in php?
Tell me how can we determine whether a php variable is an instantiated object of a certain class?
Is overloading possible in php?
What is the use of limit in mysql?
What is difference between mysql_fetch_array and mysql_fetch_assoc?
Why do we use polymorphism in php?
Explain preg_Match and preg_replace?
What is the use of header() function in php?
How to set a value in session? How to remove data from a session?
How we get ip address of client, previous reference page etc?
What are the rules for naming a php variable?
How do I make a reset button in html?
How to set cookies in PHP?
What is the use of post in php?