Searching HTML file for <tr> tags

From: Date: Fri, 09 Feb 2001 02:17:28 +0000
Subject: Searching HTML file for <tr> tags
Groups: php.general 
Request: Send a blank email to php-general+get-38871@lists.php.net to get a copy of this message
Hello everybody, Here's my code: <? $file = fopen("closings.html", "r"); if (!$file) { print "Error getting file"; } else { print "Closings.html has been gotten<Br>"; if (eregi("<tr><td>Stratford</td><td>Closed</td></tr>",$file)) { print "Stratford Closed"; } else { print "Stratford Open"; } } ?> The file closings.html has tables with weather related closings. I want to search closings.html for this line: <tr><td>Stratford</td><td>Closed</td></tr> If that line is found, it prints "Stratford Closed", if it finds that line, it prints "Stratford Open". I'm not sure that the file is even open all the way. Thanks everyone! Regards, Tyler

« previous php.general (#38871) next »