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
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 |
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 |
How do you parse and process html/xml in php?
What is rest api in php?
How can we determine whether a variable is set?
Write a php script to get the largest key in an array?
how to display and include the user system date/time in a php program/project
What is alias in php?
Write the code for upload a video file in PHP.How will You Play this in Your Page.?
2 Answers ASD Lab, Convex Digital,
How to create an array from php string?
Explain me what is the difference between $_files['userfile']['name'] and $_files['userfile']['tmp_name']?
How can I find what type of images that the PHP version supports?
Is variable name casesensitive in php?
How to download files from an external server with code in php?