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 |
Which php framework is in demand?
Is php a case sensitive language?
Why do we use namespace in php?
What is a php array?
Difference between mysql_connect and mysql_pconnect?
How to get the value of current session id?
How many types of inheritances used in php and how we achieve it.
Is laravel better than codeigniter?
How would you declare a function that receives one parameter name hello?
how to display and include the user system date/time in a php program/project
What does trim () do in javascript?
hi, i have knowledge about PHP/MYSQL,i am fresher M.Sc-IT 2009 pass out,any recruitment in PHP please let me know.