Re: Turning a string into a condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can you explain a more clearly what it is you're trying to accomplish?

It sounds like you have a string "$x < $y" in the database that you then replace into a string "4 < 5" which you want to test a conditional on. If this is the case, why are you storing conditionals in the database?

Regards,

–Josh
____________________________________
Joshua Kehn | @joshkehn	
http://joshuakehn.com

On Feb 16, 2012, at 3:31 PM, Marc Guay wrote:

> Hi folks,
> 
> I've constructed simple conditions based on DB data and would like to
> actually evaluate them with PHP.  For example, the coded string "$x <
> $y" has been str_replaced into "4 < 5", but now I would actually like
> to use that string in an if() statement.  I tried eval() but got an
> unhelpful error, any thoughts would be welcome.
> 
> Marc
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux