7 sep 2011 kl. 16.21 skrev Ron Piggott:

> 
> Hi Everyone
> 
> I am trying to load an HTML book into mySQL.  The book was distributed with 
> each chapter being it’s own HTML file.
> 
> The only way I know how to open a file is by specifying the file name.  Such 
> as:
> 
> $myFile = "B01C001.htm";
> $lines = file($myFile);
> foreach ($lines as $line_num => $theData) {
> 
> Is there a way PHP will open each file in the directory ending in “.htm”, one 
> file at a time, without me specifying the file name?
> 

http://se.php.net/manual/en/function.glob.php

/frank


> When the file is open I need the FOREACH (above) to parse the content which 
> ends with an “INSERT INTO” for a mySQL table.
> 
> Thank you in advance for any help you are able to give me.
> 
> Ron
> 
> The Verse of the Day
> “Encouragement from God’s Word”
> http://www.TheVerseOfTheDay.info  



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to