i want to store retrieved data from database into an array list with limit.And display the data from that array list one by one with next button.have any answer for this?
1 Answer
I suggest you to have a look at this kind of websites : http://www.freewebmasterhelp.com/tutorials/phpmysql
3 Comments
Rabeesh
have you confused with this question?
Guillaume Lebourgeois
Your question seems to mean you have a lack of knowledge in php/mysql development. It's why you should start by doing some tutorials.
Rabeesh
<?php include ("db.php"); $result = mysql_query("SELECT ques_id FROM questionbank order by ques_id limit 5 "); while($obj=mysql_fetch_array($result)) { $ad1[$obj['ques_id']]++;//Used an array and inserted the database query results into it. } $rand_keys=array_rand($ad1,1); //Did a random array function echo "First random id = ".$ad1[$rand_keys[0]]; echo "<br>Second random id = ".$ad1[$rand_keys[1]]; ?> <!--Its not working. Have any solution for this. --> i make a code for this question but its not working...can u help me