- array_slice: documentation ( source)
- print_r: documentation ( source)
- array_merge: documentation ( source)
- shuffle: documentation ( source)
<?php
$input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
$randomize = array_slice($input,0,3);
$keep_safe = array_slice($input,3);
shuffle($randomize);
print_r(array_merge($randomize,$keep_safe));