Re: Evaluating strings...

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

 



= is for assigment
== is for typeless comparison (meaning 1 will be equal to '1', '' will be
equal to 0)
=== is for type comparision (meaning 1 will only be equal to 1, '' will only
be equal to '', and TRUE will only be equal to true)

--
itoctopus - http://www.itoctopus.com
""Anthony J. Maske"" <ajmaske@xxxxxxxxxxx> wrote in message
news:002301c77bed$9d80d480$1501a8c0@xxxxxxx
> Hey,  Thanks for the quick response on Retrieving parameters...
>
> This is another that has me stumped...
>
>       if (trim($Line) = '<body>') {
>
>         $InBody = true;
>
>       } elseif (trim($Line) = '</body>') {
>
>         $InBody = false;
>
>       }
>
> $Line is a line from a html file, I'm trying to parse through it to ignore
> everything but the <body> section.  When I run the above I get the
> following...
>
> Fatal error: Can't use function return value in write context in
> C:\wwwRoot\anthony.maske\cfr.php on line 43
>
> If I do this...
>
> $Tag = trim($Line);
>
>       if ($Tag = '<body>') {
>
>         $InBody = true;
>
>       } elseif ($Tag = '</body>') {
>
>         $InBody = false;
>
>       }
>
> Why won't the later work?  What am I missing in the first snip...
>
> Thanks again...!
>
>
> Anthony

-- 
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