Explain Creating and Naming an Array?
No Answer is Posted For this Question
Be the First to Post Answer
What are the different types of array in php?
why did u want to leave your past organisation?
What are php magic methods/functions?
can anyone explain about stored procedure,Triggers and transaction in php?
How can we define a variable accessible in functions of a php script?
Is php an object or array?
Which php mvc framework is best?
Is PHP is procedure oriented or object oriented?
What types of loops exist in php?
What's the difference between accessing a class method via -> and via ::?
how to display and include the user system date/time in a php program/project
<?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. -->