Default argument
I'm writing a function that needs to be able to be called with or without a second argument. How do i make that accepted?
|
Re: Default argument
You should be able to go:
PHP Code:
|
Re: Default argument
Make it non-public, like:
PHP Code:
|
Re: Default argument
Quote:
|
Re: Default argument
The thing is i have the second argument used within the function. Here's my code....
Code:
stock resetLevel(id, reason[]) |
Re: Default argument
Yes, you could try it.
|
Re: Default argument
Quote:
|
| All times are GMT -4. The time now is 00:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.