Re: putting variables in a variable

This is a discussion on Re: putting variables in a variable within the PHP General forums, part of the PHP Programming Forums category; Hulf wrote: > Hi, > > I am making and HTML email. I have 3 images to put in. Currently ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 03-28-2008
M. Sokolewicz
 
Posts: n/a
Default Re: putting variables in a variable

Hulf wrote:
> 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?
>
>
> Ross

My first idea is to ask you what you WANT exactly and what's wrong with
what you have. Currently you're showing 1 string, and 3 variables.
Nothing else... what do you expect to happen that is not hapenning? Or
what do you expect not to happen that IS hapenning ?


Reply With Quote
  #2 (permalink)  
Old 03-28-2008
tedd
 
Posts: n/a
Default [PHP] Re: putting variables in a variable

At 4:47 PM +0100 3/28/08, M. Sokolewicz wrote:
>Hulf wrote:
>>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?
>>
>>
>>Ross

>My first idea is to ask you what you WANT exactly and what's wrong
>with what you have. Currently you're showing 1 string, and 3
>variables. Nothing else... what do you expect to happen that is not
>hapenning? Or what do you expect not to happen that IS hapenning ?


I think it's fuzzy thinking.

He probably wants:

$body .="
<table>
<tr>
<td><img src=\"$image.jpg\"></td>
</tr>

<tr>
<td></td>
</tr>
</table>
";

Where $image.jpg is "image1.jpg" or "image2.jpg" or "image3.jpg"

Cheers,

tedd

--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:39 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0