RE: PHP Question: Writing to a File
by "Rajnish Bhaskar" <r.bhaskar(at)compserv.gla.ac.uk>
|
| Date: |
Fri, 23 Aug 2002 09:18:26 +0100 |
| To: |
"Jami Moore" <jami(at)jamisniche.com>, jami(at)jamisniche.com |
| Cc: |
hwg-languages(at)hwg.org |
| In-Reply-To: |
dnsdomain |
| |
todo: View
Thread,
Original
|
|
Hi Jami,
I may not be understanding properly, but why not just insert the line
that I've done below (and again similarly for the subcategories):
> //Print all the main links to the text file.
> if($Open){
fwrite($Open, "Category,\tLink Name\tURL,\tDescription");
> while($row=mysql_fetch_array($getlinks)){
> fwrite($Open,"$row[category_name]\t$row[link_name]
> \t$row[link_URL]\t$row[Description]\n");
> }
> So what I need printed at the beginning of the first
> section is "Category, Link Name, URL, Description"
ie, just write the header to the file before you start the loop.
Raj.
--
Rajnish Bhaskar
r.bhaskar(at)compserv.gla.ac.uk, http://lordofthemoon.com
IT Education Unit, University of Glasgow
http://www.iteu.gla.ac.uk/
--
There is nothing in the Universe more alone than Man.
He has entered into the strange world of history...
--(Loren Eiseley)
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.