title: Fetching values from databse depending on the options selected in multiple combo box
body: <p>I have a combo box that allows multiple selection and i have another combo box.</p>
  
  <p>Depending on the values selected from the first combo box, i need to display them in the second combo box.</p>
  
  <p>My requirement scenario looks much like this example, let the first combo box contains a list of all states. Whenever a state is selected, all the cities in that state will be fetched from the database and displayed in the second combo box.</p>
  
  <p>If we select multiple items(states) in the first combo box. The cities of the selected states should be displayed in the second combo box.</p>
  
  <p>I thought of a solution for this, by storing all items selected in an array. Am not sure how to implement it. It will be of great help if anyone provides a working example.</p>
  
  <p>I am new to PHP, so finding it difficult to implement. It will be of great help if anyone provides a working example.</p>