.

Tuesday, October 18, 2011

Home » » PHP code - shuffle

PHP code - shuffle

shuffle() function is  randomizes elements in the array.



Syntax :
shuffle(array)

array= Specifies the array to use

Example:
<?php
$array = array("easy","way","to","learning", "php", "code");

shuffle($array);
print_r($array);
?>

Output:
Array ( [0] => code [1] => php [2] => easy [3] => learning [4] => to [5] => way )

0 komentar:

Post a Comment