xerocity.com
08-27-2002, 02:56 AM
Hello,
I would like to know if anyone out there can give me an example of code for what I need. I have tried all day today and it still will not work correctly.
What I need is some php code that will open a textfile and scan the entire textfile line by line (it is *not* a delimited file but each record is on its own line) and if it matches a variable then do nothing. But if there are no lines that match, append the variable to the end of the file.
It should be pretty simple but for some reason it isn't working right. I know that I can do this in perl (for example) but it is must be done in php.
It will be placed inside of a while statement which will change the variable and use the function multiple times.
Thank you in advance.
I would like to know if anyone out there can give me an example of code for what I need. I have tried all day today and it still will not work correctly.
What I need is some php code that will open a textfile and scan the entire textfile line by line (it is *not* a delimited file but each record is on its own line) and if it matches a variable then do nothing. But if there are no lines that match, append the variable to the end of the file.
It should be pretty simple but for some reason it isn't working right. I know that I can do this in perl (for example) but it is must be done in php.
It will be placed inside of a while statement which will change the variable and use the function multiple times.
Thank you in advance.
