|
Posted by Jamie Meyers on 06/09/05 07:02
"Chuck Anderson" <websiteaddress@seemy.sig> wrote in message
news:houdnQf0jJq5CzrfRVn-hw@comcast.com...
>I have a function with 7 inputs. The last three have default values.
>
> I want to call that function specifying the first four, skip two and then
> specify the last.
>
> I thought I could write this as :
>
> $retval = myfunction(arg1, arg2, arg3, arg4,,,arg7);
if you wrote myfunction, then declare it like this
function myfunction(arg1, arg2, arg3, arg4, arg5="", arg6="", arg7)...
Where "" should be set to the default values.
>
> ... but Php does not seem to want to let me do this. I get a parse error
> until I supply values for the 5th and 6th arguments.
>
> My question is simply this; is skipping arguments like that not allowed in
> Php?
>
> --
> *****************************
> Chuck Anderson . Boulder, CO
> http://www.CycleTourist.com
> Integrity is obvious.
> The lack of it is common.
> *****************************
[Back to original message]
|