function print_arr(...$numbers) { foreach ($numbers as $element) { echo $element."\n"; } } echo print_arr(1, 2, 3, 4); // outputs : 1 2 3 4
Pro tip: use ```triple backticks around text``` to write in code fences