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 reference variable php?

498


What is final class and final method in php?

551


How to retrieve the original query string?

567


What is the output of the following php code?

495


What php framework does wordpress use?

539






What is encapsulation in php with example?

552


How we can declare variable in php?

509


How can I prevent sql-injection in php?

588


How to terminate the execution of a script in PHP?

567


How to check your php installation?

508


What are the two main string operators?

543


What is a php web application?

495


what is CURL?

582


Is php free to use?

536


How can we enable error reporting in php?

467