title: How to combine isset with is_array
body: <p>I am using <code>is_array</code> function but need to use <code>isset</code> as well, as if nothing is selected I am get a undefined index error.</p>
  
  <p>I am still learning <code>PHP</code> so not sure how to combine what I have written with <code>isset</code>, my code is below    </p>
  
  <pre><code>$special = $_POST['special'];
  if (is_array($_POST['special'])) {
      $special = implode(",", $_POST['special']);
  } else {
      $special = $_POST['special'];
  }
  </code></pre>
  
  <p>Many Thanks</p>