title: Reading checkbox values using implode function
body: <p>I have inserted this form with multiple checkbox items which collects some values, What i need to do is echo this values as a string separated by a comma, but i'm getting error in the implode function, it says Invalid arguments passed.</p>
  
  <p>Can you please see the code?</p>
  
  <pre><code>if(isset($_POST['Submit'])) {
      echo "&lt;pre&gt;"; print_r($_POST);
      $checked = mysql_real_escape_string(implode(',', $_POST['checkbox'])); 
      echo $checked;
  }
  ?&gt;
  </code></pre>
  
  <p>HTML Form</p>
  
  <pre><code>&lt;form action="checkbox.php" method="post"&gt;
  &lt;input type="checkbox" name="checkbox[]" value="hostess_name"&gt;
  &lt;input type="checkbox" name="checkbox[]" value="hostess_familyname_en"&gt;
  &lt;input type="checkbox" name="checkbox[]" value="hostess_id"&gt;
  &lt;input type="checkbox" name="checkbox[]" value="hostess_firstname_en"&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;input type="submit" name="Submit" value="Submit"&gt;
  &lt;/form&gt;
  </code></pre>