preg_match("/false/i", $string) ? false : true;


On Thu, Oct 21, 2010 at 7:39 PM, Gary <php-gene...@garydjones.name> wrote:
> Is there any nice way to convert a string containing either "TRUE" or
> "FALSE" to a bool with the appropriate value? I know I can just "if
> (strcmp..." but, as the song goes on to say "...ugly, so ugly, it's ugly"[1]
>
> Footnotes:
> [1]  "Mask", Henry Rollins
>
> --
> Gary
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to