<?php $string = ", , GUWAHATI, TEZPUR, , BAMUNI HILLS, MAHABHAIRAB TEMPLE, AGNIGARH , "; echo preg_replace('/\s*(?:,\s*)+/', ', ', trim($string, ", \n\r\t\v\x00"));
You have javascript disabled. You will not be able to edit any code.