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:[EMAIL PROTECTED] Sent: 01 April 2003 12:21 To: [EMAIL PROTECTED] 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php