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

Explain me is multiple inheritance supported in php?

1009


List types of array are available in php?

931


Can you use both this () and super () in a constructor?

940


Is php better than python?

908


How a variable is declared in php?

892


Tell me how to find the position of the first occurrence of a substring in a string?

911


How do I stop php artisan serve in windows?

904


Where sessions stored in PHP?

927


How to access standard error stream in PHP?

1039


How to concatenate two strings together in php?

999


How to check whether a number is prime or not?

967


What is the use of Mbstring?

915


How does cookies work in php?

912


Does php support inheritance?

877


Explain some of the php string functions?

913