Is it possible to replace a certain character in a string with an include statement every time it is found and have the include statement run? Would regex be the best way to accomplish this?
Thanks
Example?
~Brett
I'm thinking I run a regex query searching for [!--go--] or something, and everytime it sees [!--go--] it will include and run go.php.
how would I go about doing this... I could use a regex to change it to include, but to get it to run?
[man]str_replace[/man] would work. Something like:
$string = ''; // Whatever the included file contents are $contents = str_replace('[!--go--]', '<?php include(\'go.php\'); ?>', $string);
THat's a very simplified example...