How To Perish A Random Value From Array Inwards Php?

If you lot don't hear picking the same detail ane time to a greater extent than at another fourth dimension as well as thence you lot tin go purpose next code:
    <?php    $items = array(1,5);    echo $items[rand(0, count($items) - 1)]; ?> 
It volition display a random release from the elements of array. 1 or three or five or 1 .......


Sumber http://developer-paradize.blogspot.com

Comments

Popular posts from this blog

Removing The Index.Php File From Url Inward Codeigniter

What Are The Main Components of a Computer System

Delete Daily Doppler E-Mail Spam From An Iphone [Fix]