$options = array('Option 1', 'Option 2', 'Option 3'); echo select_input_array('my_select', $options);
$options = array( 'Value 1' => 'Option 1', 'Value 2' => 'Option 2', 'Value 3' => 'Option 3', ); echo select_input_array('my_select', $options);
$options = array( 'Option 1', 'Option 2', 'Option 3' => array('disabled' => true) ); echo select_input_array('my_select', $options);This will generate a select input with the name "my_select" and the options "Option 1", "Option 2", and "Option 3". The third option, "Option 3", will be disabled and cannot be selected by the user. Package Library: The select_input_array function is not a part of the core PHP library, but it is likely included in many popular PHP form libraries, such as the Symfony Form component or the LaravelCollective Forms package.