title: how to remove comma white space during explode and replace?
body: <pre><code>$data = "google,facebook,youtube,twitter,bing";
  
  $exp = explode(",",$data);
  
  $rep = str_replace("facebook",$exp);
  $final = implode(",",$rep);
  
  echo $final
  
  output// google,,youtube,twitter,bing
  </code></pre>
  
  <p>How can I remove this blank space with comma?</p>