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

Is strcmp case sensitive?

515


What is Mcrypt used for?

579


What distinguishes php from something like client side java script?

533


How many types of array are there in php?

573


Which have the fastest execution between mysql_fetch_array() and mysql_fetch_assoc()

1813






What is the use of htmlentities in php?

502


What is the difference between characters 23 and x23?

549


What is the use of extract function in php?

509


Define soundex()?

511


What is instantiation?

1740


Is numeric in php?

531


What is implode() in php?

605


Describe the security vulnerability of PHP?

608


How to return a value back to the function caller?

556


Is php secure?

530