Posted By

embrace on 10/16/10


Tagged

array Value shuffle arr grabing


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

pytheas


Grab a random Value from an Array


 / Published in: PHP
 

Nothing special. First snippet. :)

  1. <?php
  2.  
  3. function random_arr($array) {
  4.  
  5. $random = shuffle($array);
  6.  
  7. echo $random;
  8.  
  9. }
  10.  
  11. ?>

Report this snippet  

You need to login to post a comment.