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

How come the code works, but doesn’t for two-dimensional array of mine?

985


Tell me what is pear?

963


What is active record in php?

851


Which function(s) in PHP computes the difference of arrays?

954


Which Scripting Engine PHP uses?

1099


What is ci framework in php?

953


What are php parameters?

960


What is php constructor?

990


Explain Booleans in PHP?

1051


Explain a resource?

961


How can MYSQL functions be available with PHP?

963


Which function is used in php to delete a file?

983


Is php used in 2019?

951


Tell me what is the actually used php version?

978


What is the meaning of a final class and a final method?

1045