php remove parentheses and contents from string

102

php remove parentheses and contents from string -

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

Comments

Submit
0 Comments