Thanks rfresh,
And NullPointer, what I'm doing with this is very complicated, but I'll do my best D: .
Ok so I have a script that adds posts to a database. The posts go in most recent order. So let's say you make a 'post'. It will be there. You make another post, it will not be on top of the first one. Now the file looks something like this:
Second Post|First Post
Second post is before First post.
Now I want to number these posts. Second post will be #1, and First post will be #2 (Yes, that way. Don't ask why, or I'll have to explain that, too D: ). If you add a third post...
First post will be #3, second post will be #2, and third post will be #1.
I need to keep track of these, somehow.
This is what I want:
$postNumber: First post|$postNumber: Second post|$postNumber: Third post.........
You know. But $postNumber would have to be fixed, and I'm writing this to a file, so opening and closing it, then reopening and closing it many times just to add one post hogs bandwidth. I don't want to put an fwrite in a loop
How can I possibly do this? With some uber mega ultra super coding?
Thanks 
Last edited by Physicsguy; 06-29-2010 at 05:21 PM..
|