How to randomize array in PHP ?

If you want to random order of elements in your php array, use shuffle function:$somethings = array(); $somethings[0] = "element1"; $somethings[1] = "element2"; $somethings[2] = "element3"; shuffle( $somethins );Notice that this will modify that array wich you put as a argument (pass by reference)

Comments

Popular posts from this blog

How to construct a B+ tree with example

How to show only month and year fields in android Date-picker?

Visitor Counter Script Using PHP