I'm trying to remove the contents of everything insides () brackets. <? $test = '(test)'; $test = str_replace('("[^"]*")', 'test', $test); echo $test; ?> The above doesn't work, can someone help?
you cant use regular expressions with str_replace, you should use preg_replace http://mx.php.net/manual/en/function.preg-replace.php
str_replace only replaces a string with a string. Try preg_replace() or ereg_replace() that uses regular expressions. - ads2help