Hi Everyone,
I have an array that changes in size and content on each page. Maybe it has 3 values, maybe it will have 20. This is dependent on other factors.
Assume my array was
$id = array("1","2","3","4","1","2","3","5","4","26","6","7","8","1","3","5");
What I need to do is find out which value in the array appears the most times.
The result being "1" in the above array.
At the moment Im having to use this array to display results randomly:
I use the array of IDs, use the implode() func......$matcharray=implode(',', $id) and then run:
mysql_query("select * from jobs WHERE job_id IN ($matcharray) ORDER BY RAND()");
Really, I need to list my results starting with the ID in the array that appears most.
Can anyone help?
Any advice would be really welcome.