spyros1234 Posted March 14, 2007 Share Posted March 14, 2007 Hello I am trying to make a script that will read a .txt file and it will export the text that is written in the file in separate variables I have upload the txt file www.istografos.com/gari/orders3.txt I will try to describe the file but will be better if you have the time to open it. The text is written in the same order in each txt file. The problem is the text length will be indefinable. And something else the txt file is an export from a ERP system so I can’t modify the text. I have to deal it as it is. If you have any idea please HELP Link to comment https://forums.phpfreaks.com/topic/42658-read-and-modify-the-content-of-a-txt-file/ Share on other sites More sharing options...
zq29 Posted March 14, 2007 Share Posted March 14, 2007 You can use file() or file_get_contents() to read the content of a text file into a variable. You can then loop through the data and assign it to individual variables with the explode() function. Check the manual on how to use these functions. Link to comment https://forums.phpfreaks.com/topic/42658-read-and-modify-the-content-of-a-txt-file/#findComment-206959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.