If I have:
$compare = "5<6";
How do I look at the compare variable and return the value true. The input needs to be a string so taking away the "
won't help. The string could be very complex so I'm looking for a function already in PHP which can run this, or something that someone has written before which can do this. I've tried the eval()
function but that doesn't work, so:
$compare = "5<6";
echo eval($compare);
just errors. Thanks for your help in advance.