Reputation: 103
I have string like this,
$condition = "if($test == '1')";
I want to convert it to a conditional expression without using eval()
.
Is it possible?
Upvotes: 5
Views: 1173
Reputation: 27354
Take a look at $functionName()
or call_user_func($functionName)
Upvotes: 1