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 <[email protected]>
To: [email protected]
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php