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...

i want to store retrieved data from database into an array
list with limit.And display the data from that array
list.have any answer for this?

Answer Posted / bibhu

First retrieve data from database using following command

$select = mysql_query("SELECT * FROM table limit number") or
die(mysql_error);

then store retrieve data in array using following command

while($row = mysql_fetch_array($select))
{
$rname[] = $row['name'];
}

display values of array

foreach($rname as $val)
{
echo $val;
}

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of using php?

926


What is an anti csrf token?

884


What does nan stand for computer science?

924


Explain what are psrs?

894


What does the php error 'parse error in php - unexpected t_variable at line x' means?

1057


Please explain is it possible to use com component in php?

962


Is php faster than javascript?

895


How do I run a php file?

928


How to pad an array with the same value multiple times?

881


How can you propagate a session id?

954


How do I see how many pages per session in google analytics?

958


How to concatenate two strings together in php?

1006


What is php sequence?

907


Where are cookies stored php?

873


What is the best way to avoid email sent through php getting into the spam folder?

951