elitegosu Posted March 27, 2009 Share Posted March 27, 2009 Hello everyone, I just started learning PHP and I can't figure out how to create multiple html files from a text file that has html names. For example, my text file has these names: Product1 Product2 Product3 Product4 How do I make php create Product1.html, Product2.html, Product3.html, Product4.html files? I'm storing the file names in the array by using file('pagenames.txt') but I can't figure out how to create html pages from those txt file names. Can anyone please help, thanks in advance! Link to comment https://forums.phpfreaks.com/topic/151345-creating-html-files-from-a-text-file-with-names/ Share on other sites More sharing options...
ram4nd Posted March 27, 2009 Share Posted March 27, 2009 You want to display the data as different parts. Or just safe to different files. Link to comment https://forums.phpfreaks.com/topic/151345-creating-html-files-from-a-text-file-with-names/#findComment-794900 Share on other sites More sharing options...
elitegosu Posted March 27, 2009 Author Share Posted March 27, 2009 Hey, I want php to create those blank html files on my HD - Product1.html, Product2.html, Product3.html, Product4.html Link to comment https://forums.phpfreaks.com/topic/151345-creating-html-files-from-a-text-file-with-names/#findComment-794902 Share on other sites More sharing options...
ram4nd Posted April 9, 2009 Share Posted April 9, 2009 do you want to use fopen and fwrite? There are loads of tutorials if you tap in anything similar what you are looking for to google. Link to comment https://forums.phpfreaks.com/topic/151345-creating-html-files-from-a-text-file-with-names/#findComment-805676 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.