multi dimensional array in random order

后端 未结 4 1621
谎友^
谎友^ 2020-12-02 01:43

I want to make it so that my multi dimensional array is in a random order. How would you do it?

// This is how the array looks like
print_r($slides);

Array
         


        
4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-02 02:27

    i am not sure how you want it to display but you can loop the array and use php rand(0,arraylen) function to parse the array.

提交回复
热议问题