On Tuesday 17 December 2002 22:25, Jacob van Zanen wrote: > Hi All, > > > Reasonably new to PHP and trying to write a code that looks through my > logfiles and reports the lines that contain any of the keywords in my init > file. > However can't seem to get it to work > > <? > // Open an ini file > if (!($IniContent = file("d:\MyPhp\initORA.ini"))) > { > Print ("File could not be opened"); > exit; > } > if (!($FileContent = file("d:\MyPhp\\test.ora"))) > { > Print ("File could not be opened"); > exit; > } > while (list ($LineNum, $Line) = each ($FileContent)) > { > while (list($KeyNum, $IniParm) = each($IniContent)) > { > if (strstr($Line,$IniParm)) > { > print ("$Line"); > } > } > } > ?> > > If the part that does not seem to work is the bit that does the > comparison.
'=' is an assignment operator, what you want is '==' which is the equality operator. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Do you mean that you not only want a wrong answer, but a certain wrong answer? -- Tobaben */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php