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

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 ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is php pathinfo?

1076


What is $_session in php?

995


Which of the data type is compound datatype supported by PHP?

998


How to convert strings in hex format?

1019


how to track no of users logged in?

1020


How can we display the output directly to the browser?

979


in PHP for pdf which library used?

1001


What is the best php version for wordpress?

1098


How do you measure variables?

1040


Name some of the popular frameworks in php.

1002


How long should a session last?

961


What software is required for php?

1032


What are the 5 types of data?

999


Can we extend final class in php?

1036


Is php faster than python?

1025