a valid suggestion, but why make PHP re-order the entire array when you only need to get one random value?
If you benchmark it I bet you'll find that generating a random number and picking using that as an index for the array is a lot faster than shuffling the entire array and then picking the first one.
It's a bit like dengbej's first suggestion that mysqwl uses: reorder the entire table based on random numbers, then select everything and return only the first record.
A note to explain the obvious:
for those of you who are wondering why we don't just select the lowest and highest value from the primary-key column and generate a random number between those two, that's not possible because the sequence may have gaps in it, and that would mean that we might have to do it several times before we get a correct answer.