RE: [PHP] Newb Question - find and record

From: Date: Wed, 08 May 2002 04:20:02 +0000
Subject: RE: [PHP] Newb Question - find and record
Groups: php.general 
Request: Send a blank email to php-general+get-96527@lists.php.net to get a copy of this message
use opendir(), readdir() and closedir() to find all the files use $fd = fopen ($filename, "r"); $contents = fread ($fd, filesize ($filename)); fclose ($fd); to read in the file use ereg() or preg_match() to find the text (for ereg(), use something like "<test>(.*)</test>" - this isn't tested though) Use that as a starting point HTH Martin -----Original Message----- From: David Duong [mailto:davidduong1@hotmail.com] Sent: Wednesday, May 08, 2002 2:05 PM To: php-general@lists.php.net Subject: [PHP] Newb Question - find and record How would I open every file with a *.htm extension in a directory and search for <test> have everything found between <test>...</test> tags placed in an array? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#96527) next »