read from a file and write in another file

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!

Moderator: General Moderators

Post Reply
Roger22
Forum Newbie
Posts: 8
Joined: Tue Oct 27, 2009 12:31 am

read from a file and write in another file

Post by Roger22 »

Hello,

What i wanna do is the following: in a text file i have, let's say
12
21

i wanna read from this file and write in another text file, regarding to what i read from the 1st file: i wanna parse every line, and in the output file, in case of:
12
i write
123
132
321
, and regarding to the 2nd line from the input file (21), i write in the same output file:
213
231
321
So, the final output should be:

123
132
312
--
213
231
321

Is it possible to do this?
Regards,
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: read from a file and write in another file

Post by it2051229 »

yes it is possible... come on man.. that's basic.. you can google that directly..
Roger22
Forum Newbie
Posts: 8
Joined: Tue Oct 27, 2009 12:31 am

Re: read from a file and write in another file

Post by Roger22 »

and what should i google?:)

Thanks
User avatar
it2051229
Forum Contributor
Posts: 312
Joined: Tue Dec 25, 2007 8:34 pm

Re: read from a file and write in another file

Post by it2051229 »

something like "How Read from a file in PHP" and like "PHP How to Write file"
Post Reply