Hello,
My question regarding PHP is: how do I write to a specific part of an exploded string of a file?
For example heres the text file, call it 'test.txt':
peaches mangos strawberries
cats dogs birds
jack jim jake
now I want to replace the second line and the second word, which would be "dogs" with "monkies"
so I set the pointer of the file to the second line and I explode the line with spaces " " so $string[1] points to dog, now how would I change it to monkies? I have no clue how I would do this with fwrite or what...
thanks~