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

Post New Answer

More PHP Interview Questions

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.

0 Answers   Amazon, FGD,


Which have the fastest execution between mysql_fetch_array() and mysql_fetch_assoc()

0 Answers  


Why would we use === instead of ==?

0 Answers  


What is the difference between single-quoted and double-quoted strings in php?

0 Answers  


how to insert, update data in database

4 Answers  






How can image properties be retrieved in php?

0 Answers  


What is implode() in php?

0 Answers  


<?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. -->

1 Answers  


What is exception handling in php?

0 Answers  


How do I clear my browser session?

0 Answers  


How do you put a space in html?

0 Answers  


What is the purpose of $_ session?

0 Answers  


Categories