How to remove duplicate values from php array?
No Answer is Posted For this Question
Be the First to Post Answer
Which is the best method to fetch the data from mysql? 1.mysql_fetch_array() 2.mysql_fetch_object() 3.mysql_fetch_row() 4.mysql_fetch_assoc()
which function used to get the number of days between two given dates in php
Where do I run php code?
What is csrf token in php?
What is the current php version?
Explain me difference between mysql_connect and mysql_pconnect?
How many keywords are there in php?
What is php and why we use it?
Tell me what does the php error 'parse error in php - unexpected t_variable at line x' means?
<?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 difference between $name and $$name?
What are the characteristics of php variables?