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 |
What is the difference between a session and cookies?
Tell me can the value of a constant change during the script's execution?
Where do I run php code?
Is age interval or ordinal?
Which is variable cost?
What are the uses of explode() and implode() functions?
How to execute a function in php?
What is the main difference between require() and include()?
What is the default session out time?
How do you pass a variable by value?
Which function can be used to exit from the script after displaying the error message?
Is laravel better than codeigniter?