Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-16-2002, 09:51 PM   PM User | #1
apathy
New to the CF scene

 
Join Date: Jul 2002
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
apathy is an unknown quantity at this point
Anybody offer some help to me?

Hey... could anybody help me with this please?

I can't remember the function to reverse the way in which data is inputted into a file - for example, data may be at the bottom but there's something that reverses it that makes it appear at the top of the file. I've forgotten what it is, can anybody give me some help? Thanks.
apathy is offline   Reply With Quote
Old 07-17-2002, 01:30 AM   PM User | #2
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,901
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
sorry can you be more specific ? a text file ? an array ? not quite with you ...
__________________
resistance is...

MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)
firepages is offline   Reply With Quote
Old 07-17-2002, 10:12 AM   PM User | #3
mordred
Senior Coder


 
Join Date: Jun 2002
Location: frankfurt, german banana republic
Posts: 1,848
Thanks: 0
Thanked 0 Times in 0 Posts
mordred is an unknown quantity at this point
If we are talking about files here, you will have to assign the data to a variable, open the file, read its contents, append them to previously mentioned string variable and rewrite the file with the new string variable as new contents.
mordred is offline   Reply With Quote
Old 07-18-2002, 09:51 PM   PM User | #4
apathy
New to the CF scene

 
Join Date: Jul 2002
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
apathy is an unknown quantity at this point
It's a text file. Thanks.
apathy is offline   Reply With Quote
Old 07-20-2002, 04:41 AM   PM User | #5
gorilla1
Regular Coder

 
Join Date: Jun 2002
Posts: 544
Thanks: 0
Thanked 0 Times in 0 Posts
gorilla1 is an unknown quantity at this point
$newdata = file('your.txt');
$newdata = array_reverse($newdata);

G
gorilla1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:57 PM.


Advertisement
Log in to turn off these ads.