Function arguments
Function arguments
Information may be passed to functions via the argument list, which is a comma-delimited list of expressions. The arguments are evaluated from left to right.
PHP supports passing arguments by value (the default), passing by reference, and default argument values. Variable-length argument lists are also supported.
Example #1 Passing arrays to functions
<?php function takes_array($input) { echo "$input[0] + $input[1] = ", $input[0]+$input[1]; } ?>