Evaluating strings...

From: Date: Wed, 11 Apr 2007 03:58:08 +0000
Subject: Evaluating strings...
Groups: php.general 
Request: Send a blank email to php-general+get-252553@lists.php.net to get a copy of this message
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

« previous php.general (#252553) next »