i want to get logic from string that what from input string. For example:
Input:
pageType == "static" OR pageType == "item" AND pageRef == "index"
How to i get logic like:
0 => pageType == "static"
1 => pageType == "item"
2 => pageRef == "index"
The logic clause must be complete based on what is entered.
I place like this:
$input = 'pageType == "static" OR pageType == "item" AND pageRef == "index"';
preg_match_all('/(.+)(?!AND|OR)(.+)/s', $input, $loX);
var_dump($loX);
but the array just show:
0 => pageType == "static" OR pageType == "item" AND pageRef == "index"
1 => pageType == "static" OR pageType == "item" AND pageRef == "index
2 => "
Please help me, thanks ^_^