This is probably the dumbest question out there and the answer is probably NO, but...
Is it possible to use the value of a string in the expression of an if statement? For example, say I pass
'if strcasecmp("hello", "Hello") == 0'
to a function and call it $string, could I then use that value as the conditional evaluation of an if statement?
if (the value of $string) {}
I know eval() will execute a string as if it was PHP code, but actually executes it and returns null/false, rather than just allowing the PHP surrounding the string to deal with the contents of string. I also know you can use variable variables by using ${$varname} that will tell php to use the value of $varname as the name of a a variable.
So I guess what I'm looking for is kind of like 'variable code' instead of 'variable variables'.
eval('strcasecmp("hello", "Hello") == 0');return the 'right' answer?