Hello. I will be a multiple.
Array output method to the screen:
function ShowArray($array, $message) { printf($message); foreach($array as &$value) { if(isset($value)) printf("%d\t", $value); } unset($value); // разорвать ссылку на последний элемент printf("<br/>"); } Next, I try to output the existing $ array array (1,2,3,4,5) already sorted, but I get an exception:
ShowArray(arsort($array), "ARsort Array: "); // параметры: 1. массив, 2. заголовок Warning: Invalid argument for foreach () in C: \ Users \ KRYSHTOP-PC \ PhpstormProjects \ ArraysKryshtopenko \ index.php on line 76