In statistics, the mode is the value that occurs the most frequently in a data set or a probability distribution. In some fields, notably education, sample data are often called scores, and the sample mode is known as the modal score. Like the statistical mean and the median, the mode is a way of capturing important information about a random variable or a population in a single quantity. The mode is in general different from the mean and median, and may be very different for strongly skewed distributions.
Here's the function. Enjoy it!
function getMode(array $valores){ $longitud = count($valores); $repeticiones = array(); if($longitud==0) return FALSE; foreach($valores as $valor){ $repeticiones[$valor]=0; for($i=0;$i<$longitud;$i++){ if($valores[$i]==$valor) $repeticiones[$valor]++; } } unset($valores,$longitud,$i,$valor); asort($repeticiones); $llaves = array_keys($repeticiones); return array_pop($llaves); } print getMode(array(3,3,3,5,6,4,3,6,5,4,6,3,2,8,8))."\n";

Thanks for sharing this! A bit of a newbie question to ask, though: how could this be modified to show the top 5 most repeated numbers?
Nevermind, I figured it out!