title: PHP: explode two strings and put together in sorted array
body: <p>I have two strings containing values separated by comma and space. </p>
  
  <p><strong>Example:</strong> String 1 = France, Germany, Italy; String 2 = Belgium, Netherlands
  What I want is create an array in PHP that contains all values from both strings and sorted alphabetically. 
  So in this case the output should be an array with the following values and order: 
  <strong>Belgium,France,Germany,Italy,Netherlands</strong>.</p>
  
  <p>I tried the following but this doesnt work. Can anyone tell me how I can achieve this ? I saw that I need to explode the single strings first as otherwise it seems to treat all values from one string as just one value and then the sorting doesnt work.</p>
  
  <pre><code>$countries = array();
  $input1 = explode(", ", "France", "Germany", "Italy"); //hard-coded for testing
  $input2 = explode(", ", "Belgium", "Netherlands"); //hard-coded for testing
  foreach($input1 as $key =&gt; $val) {
      array_push($countries, $input1);
  }
  foreach($input2 as $key =&gt; $val) {
      array_push($countries, $input2);
  }
  sort($countries);
  </code></pre>
  
  <p>Many thanks for any help with this, Mike. </p>