ereg_replace
Posted: Tue Aug 02, 2005 8:22 am
hi all,
how do i replace spaces or any text other than a-z using ereg_replace
for example
if i had the text "hello there." and i wanted to take out spaces and the dot how would i do that?
i tried this and it never worked
i wanted the output to be:
"hellothere"
how do i replace spaces or any text other than a-z using ereg_replace
for example
if i had the text "hello there." and i wanted to take out spaces and the dot how would i do that?
i tried this and it never worked
Code: Select all
<?php
$chosen_locationname = (ereg_replace(" [space]*_.-", "", "hello there."));
?>"hellothere"