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 use of isset() in php?
What is the difference between static and dynamic websites?
display selected value in dropdown list through javascript without page refresh
What is return in php function?
Whats the difference between include() and require()?
How to list all values of submitted fields?
How would you impletement download and upload a file in php
What is $$ in php?
What is the difference between md5(), crc32() and sha1() crypto on php?
How to download and install php on windows?
How can I find the colour of a pixel of an image?
2 Answers Rushmore Consultancy,
What is rest api in php?