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

How to join multiple strings stored in an array into a single string?

1037


Tools used for drawing er diagrams?

1000


Does php pass arrays by reference?

1101


Which function will you use to create an array?

966


What is the use of mysql_fetch_array in php?

1038


Explain Whitespace Characters?

1054


What is full form of php? Who is the father or inventor of php?

1019


How to open a file in php?

1077


What is in a cookie?

969


What is a definer in mysql?

975


How to remove white spaces from the beginning and/or the end of a string in php?

984


Explain the difference between array_merge() and array_combine()?

991


How do you count numbers in php?

969


How to return ascii value of character in php?

1174


What is the difference between nowdoc and heredoc?

982