Php file handling
Posted: Sun Oct 03, 2004 3:35 pm
Hi guys, I'm new to php but this what I'm looking to accomplish.
I want php to open a file which has contents like below:
@340
0101
1010
1111
0000
1100
0011
0110
1001
What I want php to do is to look at the file, find the first '@' then pass whatever is after it on that line to a variable.
Then I want it to take every two lines after that and convert it to one line and send it to a variable
So variable1 =01011010
It would keep doing this until it reached another '@'. Then it would repeat the process over again... can anyone help me out?
Thanks a lot! I hope i made sense!!
-Nick
I want php to open a file which has contents like below:
@340
0101
1010
1111
0000
1100
0011
0110
1001
What I want php to do is to look at the file, find the first '@' then pass whatever is after it on that line to a variable.
Then I want it to take every two lines after that and convert it to one line and send it to a variable
So variable1 =01011010
It would keep doing this until it reached another '@'. Then it would repeat the process over again... can anyone help me out?
Thanks a lot! I hope i made sense!!
-Nick