Re: Custom function
| From: | Andre Polykanine | Date: | Tue, 15 Feb 2011 23:41:44 +0000 |
| Subject: | Re: Custom function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311343@lists.php.net to get a copy of this message | ||
Hello Ron,
Give it a default (possible empty) value:
function MyFunction($x, $y, $z="") {
// function goes here
if (!empty($z)) {
// The optional parameter is given
}
}
--
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion
------------ Original message ------------
From: Ron Piggott <ron.piggott@actsministries.org>
To: php-general@lists.php.net
Date created: , 1:32:16 AM
Subject: [PHP] Custom function
Is there a way to make an optional flag in a custom function --- 2 parameters required, 1 optional?
Ron
The Verse of the Day
“Encouragement from God’s Word”
http://www.TheVerseOfTheDay.info