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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / tushal burungale

fetch_array:
fetch_array returns result in assoc array and also in
numeric array
e.g fetch_array:Array([0]=>Tushal)

fetch_row:
mysql_fetch_row returns result in numeric array only.
e.g
fetch_row:Array([0]=>Tushal[name]=>Tushal)

Is This Answer Correct ?    0 Yes 0 No

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

Answer / narasimha.p

mysql_fetch_array()works as an associative array i.e. just
use the field name specified in your database to access the
values while mysql_fetch_row() returns the value of a
single field in a particular row if you r going to specify
the array's index which starts from '0'.

Is This Answer Correct ?    0 Yes 1 No

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

Answer / aditya

sql_database
singsingle field in a particular row if you r going to specifyle field in a particular row if you r going to specify
is it correct answer????????????????????

Is This Answer Correct ?    0 Yes 1 No

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

Answer / manikandan

mysql_fetch_array()works as an associative array i.e. just
use the field name specified in your database to access the
values while mysql_fetch_row() returns the value of a
single field in a particular row if you r going to specify
the array's index which starts from '0'.

Is This Answer Correct ?    4 Yes 6 No

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

Answer / jemit p jose

mysql_fetch_row() for select aggragate data or single data
eg:select count(*) from TableName

mysql_fetch_array() for retrive more data from Table

Is This Answer Correct ?    42 Yes 53 No

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

Answer / srinivas1982

Wrong mysql_fetch_row retrives a single row or record from a
table and mysql_fetch_array returns all rows and result into
an array this array is both numeric and associative.

mysql_fetch_row has single row.
where as mysql_fetch_array has multiple rows.

Is This Answer Correct ?    25 Yes 42 No

Post New Answer

More PHP Interview Questions

How values in arrays are indexed?

0 Answers  


What does php mean?

0 Answers  


Is php case sensitive?

0 Answers  


What is meant by urlencode and urldocode?

2 Answers  


hello myself Atul saini completed mca in 2007 due to personal problem i cant do job.now i really search 4 a job.i dont know where i go i think simple think is learn php anyone help me wat i can do for a job. thanks

4 Answers  






am fresher in php ..am finished my linux,apache,mysql,and php(LAMP) course please can any one tell openings for freshers in php ...And please tell how much i demand as a fresher in PHP field just say approximately or assumption ..? at present am staying in chennai am looking my job in chennai only or else in bangalore ... hello experts please answer this question ?

2 Answers   HCL,


What is the difference between htmlentities and htmlspecialchars in php?

0 Answers  


what is CURL?

0 Answers  


I created a cookie with the value like '1A2A',now i want to update this value regularly (about 20 times in a minute) with the value '1A2A3A' , 3A is the new value,new value will vary on the request it may be 3A or 4A or 100A ,some times the cookie is updating with new value but not every time.Can any body suggest the solution

1 Answers  


How to create a session? How to remove data from a session?

0 Answers  


What can php do?

0 Answers  


How do I check environment variables?

0 Answers  


Categories