Re: Creating optional arguments



On Sat, 15 Oct 2005 21:57:52 GMT, Mazin07 <mazin07@xxxxxxxxx> 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?

http://www.php.net/manual/en/functions.arguments.php
--
Andy Hassall :: andy@xxxxxxxxxxx :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
.



Relevant Pages