|
Posted by scott Johnson on 11/20/92 11:29
Just a side note that you probably aready might know(im not always too
bright).
If you have more then one 'optional' argument:
function dosomething($var1, $var2='value2', $var3='somevalue')
They must be used in order. So if you need value3, you will need to fill
value2 also.
Siv Hansen wrote:
> Mazin07 wrote:
>
>> Let's say I have
>>
>> function dosomething ($var1, $var2, $var3) {
>>
>> ...
>>
>> }
>>
>> How do I make $var3 optional so that I can pass only 2 arguments and
>> still have it work?
>
>
>
> function dosomething($var1, $var2, $var3='somevalue'){
> ..
> }
Navigation:
[Reply to this message]
|