save the result of a query in a .txt file

General discussions related to php

Moderators: macek, egami, gesf

tufi
New php-forum User
New php-forum User
Posts: 2
Joined: Wed Mar 05, 2003 2:20 am

save the result of a query in a .txt file

Postby tufi » Wed Mar 05, 2003 2:28 am

Hi,
I would like to know how I can save the result of a query in a new .txt file. How can I do this with php code?
Thank's for helping me.

*JaH*
New php-forum User
New php-forum User
Posts: 80
Joined: Fri Jan 31, 2003 4:18 pm

Postby *JaH* » Wed Mar 05, 2003 6:21 am

with fopen() you can open a file for reading/writing
with fwrite() you can write the query into yur txt-file...

use a while() or foreach() to read through the whole query_result-array


Return to “PHP General”

Who is online

Users browsing this forum: No registered users and 3 guests