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@xxxxxxxxxxxxxxxxxx> To: php-general@xxxxxxxxxxxxx Date created: , 1:32:16 AM Subject: 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