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

Is php free to use?

0 Answers  


Can we use get instead of post?

0 Answers  


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?

2 Answers  


How can you "tell" MySQL server to cache a query?

2 Answers  


Whether One-line comment begin with pound sing(#) in php?

2 Answers  


I am working in VFP with no knowledge of web programming.I want to learn web database programmin. Can I choose PHP and MYSQL for that?

2 Answers  


What is mysqli_fetch_array?

0 Answers  


What are the different ways to login to a remote server? Explain the me, advantages and disadvantages?

0 Answers  


What is include in php?

0 Answers  


Which php framework is best for security?

0 Answers  


Why did you choose this particular career path?

0 Answers  


What is the role of the .htaccess file in php?

0 Answers  


Categories