Hi friends am trying to replace two commas separated by space with space using php. Here is my code
Suppose for example am having variable like
$va
You can try by the following solution:
$var = "hello, welcome, , , ,"; $result = explode(',', $var); $result = $result[0]. ', '. $result[1]; echo $result;