Randomize the order of the elements in the array:


SUBMITTED BY: henry1874w

DATE: June 27, 2017, 5:24 p.m.

FORMAT: Text only

SIZE: 138 Bytes

HITS: 655

  1. <?php
  2. $my_array = array("a"=>"red","b"=>"green","c"=>"blue","d"=>"yellow","e"=>"purple");
  3. shuffle($my_array);
  4. print_r($my_array);
  5. ?>

comments powered by Disqus