src/Camroncade/Timezone/Timezone.php
public function selectForm($selected = null, $placeholder = null, array $selectAttributes = [], array $optionAttributes = [] )
	{
		$selectAttributesString = '';
		foreach ($selectAttributes as $key => $value)
		{
			$selectAttributesString = $selectAttributesString . " " . $key . "='" . $value ."'";
		}

		$optionAttributesString = '';
		foreach ($optionAttributes as $key => $value)
		{
			$optionAttributesString = $optionAttributesString . " " . $key . "='" . $value ."'";
		}

		$string = "<select". $selectAttributesString .">\n";

		if (isset($placeholder) && (empty($selected)))
		{
		     $placeholder = "<option value='' disabled selected>{$placeholder}</option>";
		}
		else
		{
		      $placeholder = null;
		}

		$string = $string . $placeholder;
		foreach ($this->timezoneList as $key => $value)
		{
			if ($selected == $value) {
				$selectedString = "selected='" . $value . "'";
			} else {
				$selectedString = '';
			}

			$string = $string . "<option value='" . $value . "'" . $optionAttributesString . " " . $selectedString . ">" . $key . "</option>\n";
		}
		$string = $string . "</select>";

		return $string;
	}
public function selectForm($selected = null, $placeholder = null, array $selectAttributes = [], array $optionAttributes = [] )
	{
		$selectAttributesString = '';
		foreach ($selectAttributes as $key => $value)
		{
			$selectAttributesString = $selectAttributesString . " " . $key . "='" . $value ."'";
		}

		$optionAttributesString = '';
		foreach ($optionAttributes as $key => $value)
		{
			$optionAttributesString = $optionAttributesString . " " . $key . "='" . $value ."'";
		}

		$string = "<select". $selectAttributesString .">\n";

		if (isset($placeholder) && (empty($selected)))
		{
		     $placeholder = "<option value='' disabled selected>{$placeholder}</option>";
		}
		else
		{
		      $placeholder = null;
		}

		$string = $string . $placeholder;
		foreach ($this->timezoneList as $key => $value)
		{
			if ($selected == $value) {
				$selectedString = "selected='" . $value . "'";
			} else {
				$selectedString = '';
			}

			$string = $string . "<option value='" . $value . "'" . $optionAttributesString . " " . $selectedString . ">" . $key . "</option>\n";
		}
		$string = $string . "</select>";

		return $string;
	}
public function selectForm ( $ selected = null , $ placeholder = null , array $ selectAttributes = [ ] , array $ optionAttributes = [ ] ) { $ selectAttributesString = '' ; foreach ( $ selectAttributes as $ key => $ value ) { $ selectAttributesString = $ selectAttributesString . " " . $ key . "='" . $ value . "'" ; } $ optionAttributesString = '' ; foreach ( $ optionAttributes as $ key => $ value ) { $ optionAttributesString = $ optionAttributesString . " " . $ key . "='" . $ value . "'" ; } $ string = "<select" . $ selectAttributesString . ">\n" ; if ( isset ( $ placeholder ) && ( empty ( $ selected ) ) ) { $ placeholder = "<option value='' disabled selected>{$placeholder}</option>" ; } else { $ placeholder = null ; } $ string = $ string . $ placeholder ; foreach ( $ this -> timezoneList as $ key => $ value ) { if ( $ selected == $ value ) { $ selectedString = "selected='" . $ value . "'" ; } else { $ selectedString = '' ; } $ string = $ string . "<option value='" . $ value . "'" . $ optionAttributesString . " " . $ selectedString . ">" . $ key . "</option>\n" ; } $ string = $ string . "</select>" ; return $ string ; }
@param null $selected
@param null $placeholder
@param array $selectAttributes
@param array $optionAttributes

@return string
@param null $selected @param null $placeholder @param array $selectAttributes @param array $optionAttributes