Hi,
Basically I want to extract "foo" from the string "(foo)bar", where the only constants are the parentheses.
The method I'm using now:
In my opinion very inefficient, but I can't think of anything else at the moment.PHP Code:$tmp = explode('(', $input);
$tmp2 = explode(')', $tmp[1]);
$output = $tmp2[0];
Any hints?
Thanks.




Reply With Quote