Jeff McKeon said the following on 9/25/2003 4:00 PM>>

In the following code...

--snip--
<?PHP
$name = "bob";
Showmessage("hello $name");
Exit;
Function Showmessage($msgvar = null)
{
        echo $msgvar;
}
?>
--snip--

What is the purpose in the function def of "($msgvar = null)"??  Why not
just "function showmessage($msgvar)"??


It's to set a default value if no argument is passed to the function when called like


Showmessage();

In this case $msgvar inside the function will have a null value.

HTH
R'twick

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



Reply via email to