For sure this has already been asked by someone else, however I\'ve searched here on SO and found nothing https://stackoverflow.com/search?q=php+parse+between+words
I ha
You can also use two explode statements.
For example, say you want to get "z" in y=mx^z+b. To get z:
$formula="y=mx^z+b"; $z=explode("+",explode("^",$formula)[1])[0];
First I get everything after ^: explode("^",$formula)[1]
explode("^",$formula)[1]
Then I get everything before +: explode("+",$previousExplode)[0]
explode("+",$previousExplode)[0]