On Fri, Jan 02, 2004 at 01:20:50PM -0800, Chris wrote:
: Jason Williard asked:
: > 
: > Is there a way to make a variable of a function optional?
: 
: http://www.php.net/functions

More specifically:

        http://www.php.net/manual/en/functions.arguments.php

e.g.

        function puke ($stuff = "hairball")
        {
                echo "puking ".$stuff."\n";
                return;
        }

        puke("beer");           // echoes "puking beer"
        puke();                 // echoes "puking hairball"

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to