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
What is the difference between pop3 IMAP and MAPI?
Explain whether it is possible to share a single instance of a memcache between multiple php projects?
How does the identity operator ===compare two values in PHP?
Explain Booleans in PHP?
What is the function of mysql_real_escape_string in php?
Which function would you use to determine the length of a string in php?
How to write the form tag correctly for uploading files?
What is phpsessid?
What is the difference between the include() and require() functions?
In PHP, fgets() is used to read a file one line at a time. State Whether True or False?
Tell me what is the difference between get and post?
How many open modes available when a file open in PHP?
How do I get csrf token?
Tell us how can we access the data sent through the url with the post method?
What will the ?getdate() function returns in PHP?