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 is the difference between single-quoted and double-quoted strings in php?
Write down the code for saving an uploaded file in PHP.
Is apache needed for php?
Describe session in php.
What is difference between Method overriding and overloading in PHP?
What is the use of get and post method in php?
What is call by reference in php?
What is the correct line to use within the php.ini file, to specify that 128mb would be the maximum amount of memory that a script may use?
What is __ invoke in php?
How many escape sequences are recognized in single-quoted strings?
How to create a mysql connection in php?
Which cryptographic extension provide generation and verification of digital signatures?
Differences between get and post methods?
What is Different between Joomla And Magento?
How can a cross-site scripting attack be prevented by php?