Few simply questions - .

They have: 109 posts

Joined: Apr 1999

OK , I have a few simple questions.

When opening and printing data into a file, does the newline (\n) have to be in quotes "\n" ?

Also
when printing variables to a file, do they also have to be in quotes?
IE- Print IN "$variable";

And finally, when printing text and variables to a file (.txt) do you have to put
print "Content-type: text/html\n\n";

They have: 5,633 posts

Joined: Jan 1970

a few simple answers: Smiling
yes, they have to.

no, but in case you want to add the \n write $variable."\n"! the dot connects both expressions...

no, not if you write to file. this line is supposed to tell the browser: "heya! it's some html coming up to you!!!"

cu
patrick

They have: 62 posts

Joined: May 1999

Hi-
Yep, Patrick said it all. Smiling "Content-type: text/html\n\n" or whatever is just for printing HTML in your script.

----------
Casey Hansen
www.caseynet.com

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.