Use the \ escape character. echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"639\">\n"; ."<tr>\n"; ."<td>\n"; ."<img src=\"img_heading/spacer.gif\" width=\"25\" height=\"1\" border=\"0\">\n"; ."</td>\n"
Use the . to add to echo to make the code easier to manage. Use \n to take a newline in html so that the source code is easy to read once you view it from a browser. Just make sure at the end of your last addition line with . that you end the line with a ; E.g your last line would be ."</table>\n"; That should help you. Andrew Duck -----Original Message----- From: universal2001 [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 9 January 2002 7:01 PM To: [EMAIL PROTECTED] Subject: [PHP] echo "" problem NEW Importance: High Hi again! Thanks for the reply! I still have another question: I want to create a recycleable code by printing a set of html code which I copied and paste from my html edittor. however because there are lots of quotation marks on the html code it result an error page. here is part of the html code: <table border="0" cellpadding="0" cellspacing="0" width="639"> <tr> <td><img src="img_heading/spacer.gif" width="25" height="1" border="0"></td> </tr> <tr> <td colspan="11"><img name="index_r1_c1" src="img_heading/index_r1_c1.gif" width="639" height="5" border="0"></td> <td><img src="img_heading/spacer.gif" width="1" height="5" border="0"></td> </tr> <tr> <td rowspan="5"><img name="index_r2_c1" src="img_heading/index_r2_c1.gif" width="25" height="43" border="0"></td> </table> ...etc so I tired to use (echo) like this: echo "<table border="0" cellpadding="0" cellspacing="0" width="639"> <tr> <td><img src="img_heading/spacer.gif" width="25" height="1" border="0"></td> </tr> <tr> <td colspan="11"><img name="index_r1_c1" src="img_heading/index_r1_c1.gif" width="639" height="5" border="0"></td> <td><img src="img_heading/spacer.gif" width="1" height="5" border="0"></td> </tr> <tr> <td rowspan="5"><img name="index_r2_c1" src="img_heading/index_r2_c1.gif" width="25" height="43" border="0"></td> </table>"; but it DOES NOT WORK. How do I get way with all of the quotation marks???? thank for all the help. Dani -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]