I'm trying to have a page select a song at random from a dir of .mp3 files and play it. This is what I have so far http://pastebin.com/Jypx80RD I get this error:
Second argument has to be between 1 and the number of elements in the array
For this line:
$random = array_rand($files, 2);