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 is the difference between single-quoted and double-quoted strings in php?

1174


Write down the code for saving an uploaded file in PHP.

1113


Is apache needed for php?

956


Describe session in php.

1116


What is difference between Method overriding and overloading in PHP?

1096


What is the use of get and post method in php?

1055


What is call by reference in php?

1069


What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?

1036


What is __ invoke in php?

1064


How many escape sequences are recognized in single-quoted strings?

986


How to create a mysql connection in php?

1030


Which cryptographic extension provide generation and verification of digital signatures?

987


Differences between get and post methods?

1084


What is Different between Joomla And Magento?

2892


How can a cross-site scripting attack be prevented by php?

1025