Hi everyone,
I'm busy with a preg_replace, but somewhy it won't work.
This is what i want:
I have postvar with php-code in it, that i write away in a file. (It's module-builder that generates php when you select some options). That works perfectly fine, but...
I also want to filter a few words from the php postvar, with wich i generate some other code.
I want to filter instances of
if ($action==\"value\")
It is an postvar so the backslashes are also in the code. I want to filter form any instance of this string the word value, while all the other may not remain in the string. Of course value can have ony value itself.
The code i use is following:
$fields = preg_replace("|(.*)\((\$action==\\\")(.*)(\\\"\))(.*)|Uis", "\\3,", $php);
Please help my, thanks in advance!