Vitalik Jimbei Vitalik Jimbei - 1 year ago 69
MySQL Question

how to write all content from array to file php?

I have this PHP page :

enter image description here

For some reason I can't paste it here properly

I am able to write to file only in the last row, not all rows. As seen above I have tested using echo if I am displaying all content. I do, but for some reason can't write all of it to file.

Answer Source

function fopen() with w+ mode overrides the file because it places the file pointer at beginning of the file.

You want to use a mode instead.

See mode description:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download