What are some alternative approaches to achieving the same functionality as using multiple dropdown menus in PHP forms?

Using multiple dropdown menus in PHP forms can clutter the form and make it less user-friendly. One alternative approach is to use a single dropdown menu with nested options to achieve the same functionality. This can help streamline the form and make it easier for users to make selections.

<select name="nested_dropdown">
  <option value="">Select an option</option>
  <optgroup label="Group 1">
    <option value="1">Option 1</option>
    <option value="2">Option 2</option>
  </optgroup>
  <optgroup label="Group 2">
    <option value="3">Option 3</option>
    <option value="4">Option 4</option>
  </optgroup>
</select>