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

Do you know what is the use of the function 'imagetypes()'?

0 Answers  


List few sensible functions in PHP?

0 Answers  


What is a query give example?

0 Answers  


What is the main function of php?

0 Answers  


m new to xampp i want to configure file server in xampp... is it possible ??? if so help me....

0 Answers  


What are the differences between require and include?

0 Answers  


Explain some of the php string functions?

0 Answers  


What is the main difference between asp net and php?

0 Answers  


How can we calculate the similarity between two strings?

0 Answers  


What is ci framework in php?

0 Answers  


What are the Merits and De-Merits of CURL library ?

1 Answers  


What is a controller in php?

0 Answers  


Categories