title: Adding Comma in Specific Spaces using Regex in PHP
body: <p>I need to add comma only at <strong>first</strong> and <strong>third</strong> spaces between 4 separated strings. I am using following regex but this is adding the <code>,</code> after each strings</p>
  
  <pre><code>&lt;?php
  
  $date = "Thursday November 3 2016";
  $fdate = implode(", ", preg_split("/[\s]+/", $date));
  
  echo $fdate;
  ?&gt;
  </code></pre>
  
  <p>output:</p>
  
  <blockquote>
    <p>Thursday, November, 3, 2016</p>
  </blockquote>
  
  <p>which I need to get </p>
  
  <blockquote>
    <p>Thursday, November 3, 2016</p>
  </blockquote>
  
  <p>Can you please let me know how I can fix this?</p>