RE: [PHP] how do i give optional arguments to functions??

From: Date: Wed, 24 Oct 2001 21:09:22 +0000
Subject: RE: [PHP] how do i give optional arguments to functions??
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-72164@lists.php.net to get a copy of this message
Yes, it definitely should :) Heh, I think I originally had "", but then new that'd result with the double space problem, so changed it. My bad. -----Original Message----- From: John A. Grant [mailto:jazrant@zsc.nrcan.zc.ca] Sent: Wednesday, October 24, 2001 1:28 PM To: php-general@lists.php.net Subject: Re: [PHP] how do i give optional arguments to functions?? "Chris Bailey" <chris@codeintensity.com> wrote in message news:ABEIIICMAOMJLCHAGHOFCEIACEAA.chris@codeintensity.com... > Check out the manual section on default parameters... > > But the basics are: > > function top($image = "null") { > if ($image) Shouldn't that be: function top($image=null) if ($image) -- John A. Grant * I speak only for myself * (remove 'z' to reply) Radiation Geophysics, Geological Survey of Canada, Ottawa If you followup, please do NOT e-mail me a copy: I will read it here -- 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

« previous php.general (#72164) next »