PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Is there a relatively simple way to add lines to a file at a specific point without destroying any other data in the file?
I am basically wanting to insert a new line of text into a file so that the lines stay in decending alphabetical order in reference to a specific word in each line.
read the remaining data of the file, write the new entry and append what you've read.
If the file is too big use a temp.file so you can do it in parts and move the temp.file when done.