Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / piyush patel

mysql_fetch_array:

This function return row as an associative array, a numeric
array, or both. you can refer to outputs as databases
fieldname rather then number.
example :
$result=mysql_query($query);
while($row=mysql_fetch_array($result))
{
print "$row['name']";
print "$row['mobile']";
}

mysql_fetch_row :

This function return row as an enumrated array and each row
contain a unique ID.
example:
$result=mysql_query($query);
while($row=mysql_fetch_row($result))
{
print "$row[0]";
print "$row[1]";
print "$row[2]";
}

Is This Answer Correct ?    30 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

iam mca post graduate in 2010 not getting job in JAVA so iam looking for carear in php as market demand is high so it is best option to try for php or not

1850


When sessions ends?

952


Explain me how failures in execution are handled with include() and require() functions?

1021


What is default session time in php?

959


Is null or empty c#?

913


What does trim () do in javascript?

1021


What is polymorphism in php?

982


How can we change the maximum size of the files to be uploaded?

1029


What is if isset ($_ post submit )) in php?

1027


Why session timeout is important?

1107


How to create a text file in PHP?

1117


How to calculate the length of a string?

1103


What is the difference between $name and $$name?

997


What is php compared to html?

965


Which character is used to match exactly one character?

985