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 |
Why php is sometimes called as embedded scripting language?
How do you find the length of a string in php?
Can we extend final class in php?
What is pdo classes?
What is the difference between include and include_once ? Which is one is good in terms of performance ?
List out different arguments in PHP header function?
Is php a dying language?
Give the case where we can use get and we can use post methods?
Is php a mvc?
Why php script is not running in browser?
Use of Session
What are magic methods?