title: Imploding $_POST values with comma
body: <p>I have a textarea in my form where user will enter data line by line. I am processing it using  <code>$_POST</code> . I have to separate each line by a comma while echoing it in php</p>
  
  <p>the text area content like this</p>
  
  <pre><code>233
  123
  abf
  4c2
  </code></pre>
  
  <p>I tried with below code</p>
  
  <pre><code>$array = array($_POST['devices']);
  $device = implode(",", $array);
  
  echo $device;
  </code></pre>
  
  <p>But it not showing commas between each value, rather I will get plain values like</p>
  
  <pre><code>233 123 abf 4c2
  </code></pre>
  
  <p>How can I show it like</p>
  
  <pre><code>233,123,abf,4c2
  </code></pre>
  
  <p>All above values are part of the text area, </p>