Re: echo "" problem NEW
| From: | Henning Sprang | Date: | Wed, 09 Jan 2002 12:05:50 +0000 |
| Subject: | Re: echo "" problem NEW | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-79898@lists.php.net to get a copy of this message | ||
Hy,
universal2001 wrote:
Hi again! Thanks for the reply! I still have another question:
so I tired to use (echo) like this: echo "<table border="0" cellpadding="0" cellspacing="0" width="639"> <tr>1) you can escape each double quote with a backslash, the first line of your thing woulkd then look like echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"639\"> and so on 2) if you don't want this by any reason, you can use single quotes to mark the text you want to print out like in echo '<table width="100%">'; the difference is that with single quotes you will _not_ be able to use variable replacement in between the quotes, something like <? $myvar=100; echo "<table width=\"$myvar\">"; ?> will output <table width="100%"> while this: <? $myvar=100; echo '<table width="$myvar">'; ?> will output exactly <table width="$myvar"> hth, henning<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????