PHP shuffle() Function
Complete PHP Array Reference
Definition and Usage
The shuffle() function randomizes the order of the elements in the array.
This function assigns new keys for the elements in the array. Existing keys
will be removed.
This function returns TRUE on success, or FALSE
on failure.
Syntax
| Parameter |
Description |
| array |
Required. Specifies the array to use |
Example
<?php
$my_array = array("a" => "Dog", "b" => "Cat", "c" => "Horse");
shuffle($my_array);
print_r($my_array);
?>
|
The output of the code above could be:
Array ( [0] => Cat [1] => Horse [2] => Dog )
|
Complete PHP Array Reference
Add automated outbound phone calls to your application!
 |
|
Enhance your project with this inexpensive reliable Web Service. Phone calls can be sent as pre-recorded sound files,
text to speech, or by using a combination of both. You can also
change call flow based on interaction.
Phone Notify! is being utilized for fraud prevention, emergency notification calls, courtesy calls, automated telemarketing calls, voice broadcasts, automated dialers, appointment reminders and more.
50 FREE phone calls for W3School users >
|
|