coly01 Posted December 12, 2014 Share Posted December 12, 2014 Hi, I've got a "data.txt" file with the following content: One1:One2:One3:One4:One5:One6 Two1:Two2:Two3:Two4:Two5:Two6 Three1:Three2:Three3:Three4:Three5:Three6 Now I want to be able to take each data and put on a specific location of a htlm code. Each line for its own. So for the first line, it should look something like this: <html> <head> <title></title> <head> <body> <h1>One2</h1> <h2>One4 some other Text One5</h2> <img src="One6.jpg"> </body> </html> Unforturtunately I don't have a clue how to do that. Can anybody help me out or does someone know a good and easy tutorial? Thanks a lot Link to comment https://forums.phpfreaks.com/topic/293056-take-data-from-txt-file-and-display-on-html5-website/ Share on other sites More sharing options...
Barand Posted December 12, 2014 Share Posted December 12, 2014 A couple of functions you should look at to get you started are file() explode() Link to comment https://forums.phpfreaks.com/topic/293056-take-data-from-txt-file-and-display-on-html5-website/#findComment-1499404 Share on other sites More sharing options...
superromia Posted December 16, 2014 Share Posted December 16, 2014 Read this, it helps. http://www.w3schools.com/php/php_file_open.asp Link to comment https://forums.phpfreaks.com/topic/293056-take-data-from-txt-file-and-display-on-html5-website/#findComment-1499705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.