What is the best way to change the key without changing the value of a php array element?
No Answer is Posted For this Question
Be the First to Post Answer
Binary tree question - Node has numeric data (int) The function takes depth as argument and sum all the value of the node of the depth. For instance, (0) depth 0 / \ 10 20 depth 1 / \ / \ 40 50 60 70 depth 2 so if you pass get_sum(2), you would return 220 which is 40+50+60+70 (sum of depth2) write the function.
Which have the fastest execution between mysql_fetch_array() and mysql_fetch_assoc()
Why would we use === instead of ==?
What is the difference between single-quoted and double-quoted strings in php?
how to insert, update data in database
How can image properties be retrieved in php?
What is implode() in php?
<?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 exception handling in php?
How do I clear my browser session?
How do you put a space in html?
What is the purpose of $_ session?