Grab a random Value from an Array


/ Published in: PHP
Save to your folder(s)

Nothing special.
First snippet. :)


Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. function random_arr($array) {
  4.  
  5. $random = shuffle($array);
  6.  
  7. echo $random;
  8.  
  9. }
  10.  
  11. ?>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.