- array_map: documentation ( source)
- print_r: documentation ( source)
- shuffle: documentation ( source)
- range: documentation ( source)
<?php
$liczby = range(1,120);
shuffle($liczby);
function checkSomething($number) {
$test = (int) ($number / 10) +1;
return "{$number} - {$test} dziesiatka";
}
$passed = array_map("checkSomething", $liczby);
print_r($passed);