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?

Answers were Sorted based on User's Feedback



i want to store retrieved data from database into an array list with limit.And display the data fro..

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

i want to store retrieved data from database into an array list with limit.And display the data fro..

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

More PHP Interview Questions

What is the use of isset() in php?

0 Answers  


What is the difference between static and dynamic websites?

0 Answers  


display selected value in dropdown list through javascript without page refresh

1 Answers  


What is return in php function?

0 Answers  


Whats the difference between include() and require()?

4 Answers  


How to list all values of submitted fields?

0 Answers  


How would you impletement download and upload a file in php

2 Answers   A1 Technology,


What is $$ in php?

0 Answers  


What is the difference between md5(), crc32() and sha1() crypto on php?

0 Answers  


How to download and install php on windows?

0 Answers  


How can I find the colour of a pixel of an image?

2 Answers   Rushmore Consultancy,


What is rest api in php?

0 Answers  


Categories