RE: [PHP] writing file

From: Date: Tue, 01 Apr 2003 11:25:35 +0000
Subject: RE: [PHP] writing file
Groups: php.general 
Request: Send a blank email to php-general+get-141803@lists.php.net to get a copy of this message
If you want to use the " in within the string, you should use ' to surround the string ie: $string='<html>...... <div align="center">.........'; Thanks Mark -----Original Message----- From: Diksha Neel [mailto:diksha_neel@rediffmail.com] Sent: 01 April 2003 12:21 To: php-general@lists.php.net Subject: [PHP] writing file dear all, hi! i have a php script from which i am creating an html file as under. my problem is that when i open aditya.html, i can see the variable values and "hi!". but when i want to put the value of $cname in the center of the screen by using div tag as: <div align="center"> $cname </div> i get a parse error. why is the div tag not working? regards, diksha. $fp = fopen ("aditya.html", "w"); $string="<html> <head><title>aditya</title></head><body><centre> <h1><u>$cname</u></h1></centre>hi!$city $bemail</body></html>"; $contents=fwrite($fp, $string); echo "'$contents'"; fclose($fp); _______________________________________________________________________ Odomos - the only mosquito protection outside 4 walls - Click here to know more! http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htm&&odomos&&w n -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#141803) next »