Re: Understanding code.. again
| From: | Brad Pauly | Date: | Thu, 25 Sep 2003 20:08:55 +0000 |
| Subject: | Re: Understanding code.. again | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163987@lists.php.net to get a copy of this message | ||
Jeff McKeon wrote:
Function Showmessage($msgvar = null) { echo $msgvar; } ?> --snip-- What is the purpose in the function def of "($msgvar = null)"?? Why not just "function showmessage($msgvar)"??That sets a default value for $msgvar so you can call the function without an argument and it will not raise an error. - Brad