I want to remove everything inside () in a string. For example if my string is $string = "this is an example string (this is the part i want to remove)";
I tried it with str_replace but naturally it just replaces "(" and not the content inside it. How can I do that since i won't know the contents beforehand?