public static function optgroup($text, $optKey = 'value', $optText = 'text')
	{
		// Set initial state
		static $state = 'open';

		// Toggle between open and close states:
		switch ($state)
		{
			case 'open':
				$obj = new stdClass;
				$obj->$optKey = '<OPTGROUP>';
				$obj->$optText = $text;
				$state = 'close';
				break;
			case 'close':
				$obj = new stdClass;
				$obj->$optKey = '</OPTGROUP>';
				$obj->$optText = $text;
				$state = 'open';
				break;
		}

		return $obj;
	}
public static function optgroup($text, $optKey = 'value', $optText = 'text')
	{
		// Set initial state
		static $state = 'open';

		// Toggle between open and close states:
		switch ($state)
		{
			case 'open':
				$obj = new stdClass;
				$obj->$optKey = '<OPTGROUP>';
				$obj->$optText = $text;
				$state = 'close';
				break;
			case 'close':
				$obj = new stdClass;
				$obj->$optKey = '</OPTGROUP>';
				$obj->$optText = $text;
				$state = 'open';
				break;
		}

		return $obj;
	}
public static function optgroup ( $ text , $ optKey = 'value' , $ optText = 'text' ) { // Set initial state static $ state = 'open' ; // Toggle between open and close states: switch ( $ state ) { case 'open' : $ obj = new stdClass ; $ obj -> $ optKey = '<OPTGROUP>' ; $ obj -> $ optText = $ text ; $ state = 'close' ; break ; case 'close' : $ obj = new stdClass ; $ obj -> $ optKey = '</OPTGROUP>' ; $ obj -> $ optText = $ text ; $ state = 'open' ; break ; } return $ obj ; }
Create a placeholder for an option group.

@param   string  $text     The text for the option
@param   string  $optKey   The returned object property name for the value
@param   string  $optText  The returned object property name for the text
@return  object
@deprecated  Use self::groupedList()
Create a placeholder for an option group .