|
Posted by friglob on 09/15/06 11:34
iulian.ilea wrote:
> Hey,
>
> I try to explain what is "arguments from function" :)
>
> So... if I have a function (i.e. function me($param1, $param2)). It is
> possible to call me($param1)? Like in JavaScript.
>
yes, if you have some default $param2 value defined in the function
predefined argument values always must be after arguments that don`t have predefined values
function me ( $param1 , $param2 = null ) { ... }
function me ( $param1 , $param2 = 123 ) { ... }
function me ( $param1 , $param2 = "word" ) { ... }
[Back to original message]
|