Re: Optional Parameter ?
| From: | almir | Date: | Wed, 21 Mar 2001 22:14:36 +0000 |
| Subject: | Re: Optional Parameter ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-45008@lists.php.net to get a copy of this message | ||
function print_this( $value1, $value2, $maybe3="somethin") {
}
-almir
"Jack Sasportas" <jack@innovativeinternet.com> schrieb im Newsbeitrag
news:3AB8695B.FE2E8C91@innovativeinternet.com...
> Is it possible to have a function that looks something like
>
> function print_this( $value1, $value2, $maybe3) {
>
> do whatever;
>
> }
>
> that would expect $value1, $value2 BUT would not care if $maybe3 came in
> or not ? and not give an error message that there is a missing paramter
> ?
>
> I know I can do a condition within the function, but just want to see if
> there is a more technical approach as in from php to ignore that
> optional per say variable.
>
>
> I did look in my PHP book by wrox, but no luck.
>
> Thanks !!!
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>