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!
Kindly I need some help. I can connect to and display my data properly from the DB. I want to write the displayed data to a text file. I cant figure out where to put things, considering the while statement in my code.
1. The "unexpected $end" is because you opened a set or braces after the while statement, but never close it.
2. You are calling flose($fp); and it should be fclose($fp);
3. You need another step to actually write what you want to the file: fwrite($fp,"Stuff to write, you have to specify newlines!\n");
so my problem now is, how do I assign the above to a variable in order to fit inside the statement fwrite($Handle, $Data); properly. Ive tried several combinations, to put the above into $Data = " "; but I give getting a syntax error.