Re: putting variables in a variable
| From: | Yannick Warnier | Date: | Fri, 25 Apr 2008 02:10:48 +0000 |
| Subject: | Re: putting variables in a variable | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-273552@lists.php.net to get a copy of this message | ||
Le lundi 28 mars 2011 à 12:06 +0100, Hulf a écrit :
> Hi,
>
> I am making and HTML email. I have 3 images to put in. Currently I have
>
> $body .="
> <table>
> <tr>
> <td><img src=\"image1.jpg\"></td>
> </tr>
>
> <tr>
> <td></td>
> </tr>
> </table>
> ";
>
>
> ideally I would like to have
>
> $myimage1 = "image1.jpg";
> $myimage2 = "image2.jpg";
> $myimage3 = "image3.jpg";
>
>
> and put them into the HTML body variable. I have tried escaping them in
> every way i can think of, dots and slashes and the rest. Any ideas?
The question is not very clear to me, but doesn't the following give
what you are trying to get?
$myimage1 = "image1.jpg";
$body .="
<table>
<tr>
<td><img src=\"$myimage1\"></td>
</tr>
<tr>
<td></td>
</tr>
</table>
";
Otherwise, could you explain your intentions in another way?
Yannick