How to append a specific line in any doc file through the file handling I want to append the specific line/word in the doc file for example .............. if in doc file include a 3 lines and i want to change 2nd line "my name is price. I'm working in ncr zone. I'm working in a software company." here i want to change second line "I'm working in ncr zone." how can do it????????????????????? plz help............... it's urgent...............
In a text file you can read the contents using file_get_contents() then you could explode() the contents with a line break as the delimiter to work out which is the 2nd line. Modify and then output to the same file. That should be enough to get you started!