PHP Preg_replace
I'm doing a preg_replace and want it to execute a function that is named whatever it finds (\\1)
how do I do that?
like with if (!$sql) { echo "oops. not working"; }
$content = preg_replace("/#\[([^#]*)\]#/e","\\1",$content);
I want the \\1 to actually be a function
LuckDrago: eval
Tyrexian, better check man for it, i cant explain, its was kinda confusing for me just recently
there are remarks about this
Chambrln when I do that I get something about an unexpected $end
LuckDrago: did you look up eval? http://us3.php.net/eval
well, you'd probably want a controlling structure that takes care of all the objects and passing them to and from other objects to do operators.
err operations.
well, like you have down at the bottom, where you great the classes.
err objects
I'm trying to have it execute a function named whatever \\1 is
class car { var $wheels; var $engine; function drive(); function park() }
you have to think object oriented
it's not something that i can give an example of easily
AH got it now !