kobescoresagain
05-08-2006, 03:40 AM
I have a txt file that I need to edit using php. I understand how to open it and everything. I am just having problems adding text into the file. Basically here is what the actually file would generally look like.
Some random xml tags
<item>
</item>
<item>
</item>
<item>
</item>
<item>
</item>
two closing xml tags.
The tags at the beginning will change often, so I am not 100% sure what will be there. But it will not ever need to be edited through this code (all done manually).
I basically want to add items into this code. I want to add the items to the beginning on the item list, and after the beinning random xml tags. It would result in
Some random xml tags
<new item>
</new item>
<item>
</item>
<item>
</item>
<item>
</item>
<item>
</item>
two closing xml tags.
I have been told that I need to bring the data in 1 line at a time, but I am not 100% sure what exactly I need to do. Anyh guidance would be greatly appreciated.
Some random xml tags
<item>
</item>
<item>
</item>
<item>
</item>
<item>
</item>
two closing xml tags.
The tags at the beginning will change often, so I am not 100% sure what will be there. But it will not ever need to be edited through this code (all done manually).
I basically want to add items into this code. I want to add the items to the beginning on the item list, and after the beinning random xml tags. It would result in
Some random xml tags
<new item>
</new item>
<item>
</item>
<item>
</item>
<item>
</item>
<item>
</item>
two closing xml tags.
I have been told that I need to bring the data in 1 line at a time, but I am not 100% sure what exactly I need to do. Anyh guidance would be greatly appreciated.