I have a text string:
$str = "This is my string (something else)";
The string may or may not have something in ( ), but if it does, I need to strip it entirely. I tried this:
$new = str_replace('/\\(.*/', '', $str);
But it does not seem to work... What am I missing?
$new = preg_replace('/\(.*\)/', '', $str);