I know the below code
<?php
$array = array("1", "hello", "1", "world", "hello");
print_r(array_count_values($array));
?>
Will output:
Array
(
[1] => 2
[hello] => 2
[world] => 1
)
I would like to retrieve the value which has been repeated the most, or if there are multiple matching instances which have been repeated the most e.g "hello" and "1" randomise them instead of retrieving the first one.