What I mean, is I'm trying to understand the logic to the first parameter.
From what I see, it's not taking out the brackets, but you put the items you wish to replace [inside the brackets]
[ ()-]+ means to look for parentheses and the dash. But the + plus isn't affected. That must mean I can add more to replace?
I already took a look at the PHP explaination of ereg_replace. But it doesn't go into detail of explaining all this.
<?
$text = ereg_replace("[ ()-]+", " ", "555-555-5(a)55+5[]");
echo $text;
?>
outputs: 555 555 5 a 55+5[]
And what if I want to add more, like taking out letters, or other characters to replace?