Advertisement
bpoole

Return random index from array

Feb 20th, 2014
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.08 KB | None | 0 0
  1. //return a random index from an array
  2. $random_index = rand( ) % sizeof(some_array);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement