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
How to join multiple strings stored in an array into a single string?
Tools used for drawing er diagrams?
Does php pass arrays by reference?
Which function will you use to create an array?
What is the use of mysql_fetch_array in php?
Explain Whitespace Characters?
What is full form of php? Who is the father or inventor of php?
How to open a file in php?
What is in a cookie?
What is a definer in mysql?
How to remove white spaces from the beginning and/or the end of a string in php?
Explain the difference between array_merge() and array_combine()?
How do you count numbers in php?
How to return ascii value of character in php?
What is the difference between nowdoc and heredoc?