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
What percentage of websites use php?
How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain
What is abstract class in php?
What are the two main string operators?
Can you explain, when to use if-else if-else over switch statements?
Why do we need abstract class in php?
Is it worth learning php in 2019?
What is call by reference in php?
Explain what are the three classes of errors that can occur in php?
What are the functions of string?
Explain php explode() function.
Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would we validate whether the field is empty? Print a message "the email cannot be empty" in this case?
What does PEAR stands for?
How do I run a php script?
What is global array in php?