Thread: function help
View Single Post
Old 11-22-2004, 07:15 PM   #2 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 151
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
Yes, if there is a default value you want your function to use, but you want to be able to use some other value occasionally, create the function like this

PHP Code:
function some_function($foo$bar 7) {


Writing the function like that will allow you to call the function without a value for $bar and it will default to 7, or you can give it a different value if you wish.
__________________
Current Project
Redline is offline   Reply With Quote