I have a loop that outputs strings of text:
$str = 'Tasdasd asda dasdasdasdad (asdasdasd)';
I need to remove the part that's enclosed in ( ) from the end of the. I thing I need regular expressions for it.
I know that my match is this: (.*)
and my function
preg_replace($pattern, $replacement, $string);
Putting it together messes all up. I think I need to escape properly. Could use some help at this point putting it together.