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 php crud api?
How do I start a php session?
Explain some most commonly use string functions in php?
Explain about PHP filter and why it should be used?
Is echo a function in php?
How to connect to mysql from a php script?
How can post form values with out press submit button
How to replace a substring in a given string in php?
What type of headers have to add in the mail function in which file a attached?
How many functions are there in php?
•How do you create subdomains using PHP?
How to open standard output as a file handle?