Below is a php Script, its not clean nor friendly more or less need a point in the direction why its crashing my server, Im trying to view my error logs on my server but its crashed and i cant access it now....my php skills are not that good... any help is appreciated:\[code\] $checker = 0; function shuffleArray($myArray) { $value_count = array_count_values($myArray); $last_value = http://stackoverflow.com/questions/15748768/$myArray[count($myArray) - 1]; unset($myArray[count($myArray) - 1]); $shuffle = array(); $last = false; while (count($myArray) > 0) { $keys = array_keys($myArray); $i = round(rand(0, count($keys) - 1)); while ($last === $myArray[$keys[$i]] ) { $i = round(rand(0, count($keys) - 1)); echo"stuck";$checker++; if($checker>100){ echo " Too many checks so die, and restart process "; exit; } } $shuffle[] = $myArray[$keys[$i]]; $last = $myArray[$keys[$i]]; unset($myArray[$keys[$i]]);}if ($last_value =http://stackoverflow.com/questions/15748768/== $last) {$i = 0;foreach($shuffle as $key=>$value) { if ($value !== $last_value) { $i = $key; break; } } array_slice($shuffle, $i + 1, 0, $last_value); } else { $shuffle[] = $last_value; } return $shuffle; } $shuffleReel = (shuffleArray($virtualReel)); function bob(){if($checker>100){ $checker = 0; shuffleArray(); echo"bob"; reset($myArray);} }\[/code\]