Hello I want to convert the intervals in my url as _ . For example I have : <a href=\"http://mysite.com/".$data["name"]."\" > ... $data["name"] is equal to "test url" I want to be "test_url" Any help ? Thanks in advance and sorry for my bad english
Try this. <?php $text = "test test test "; $text = ereg_replace('[[:blank:]]', '_', $text); echo $text; ?> PHP: