|
Posted by Erwin Moller on 09/15/06 11:42
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.
Hi
I am not 100% sure I understand what you want, but this may be relevant:
You can use defaultvalues in the function like this:
function testFunc($arg1,$arg2='test',$arg3=false){
...
}
If you call testFunc like this:
testFunct(23,'Joe');
In testFunct the following values are used:
$arg1 <- 23 (passed by calling of the function)
$arg2 <- 'Joe' (passed by calling of the function)
$arg3 <- false. Defaults to the value you defined in the function.
Does that help?
Regards,
Erwin Moller
[Back to original message]
|