How to select a database in php?
No Answer is Posted For this Question
Be the First to Post Answer
Which is true about the singleton design pattern?
How can you insert javascript in php code?
Write a program to find the factorial of a number in php?
Write a hello world program using variable?
Is polymorphism inherited?
How arrays are used in php?
Who created numbers?
What is session and Cokkies . How it works . tell some thing about Session_id()
1 Answers DVS, Net Solution, PVWEBCO,
<?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. -->
What is the purpose of using php?
How to get total number of elements used in array?
How to increase the maximum execution time of a script in php?