php remove parentheses and contents from string

105

php remove parentheses and contents from string -

$string = "ABC (Test1)";
echo preg_replace("/\([^)]+\)/","",$string); // 'ABC '

Comments

Submit
0 Comments