Page 1 of 1

read from a file and write in another file

Posted: Wed Oct 28, 2009 4:46 pm
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,

Re: read from a file and write in another file

Posted: Wed Oct 28, 2009 10:12 pm
by it2051229
yes it is possible... come on man.. that's basic.. you can google that directly..

Re: read from a file and write in another file

Posted: Thu Oct 29, 2009 12:30 am
by Roger22
and what should i google?:)

Thanks

Re: read from a file and write in another file

Posted: Thu Oct 29, 2009 5:03 am
by it2051229
something like "How Read from a file in PHP" and like "PHP How to Write file"