how do you interpoplate against units in a here-doc?

G

~greg

problem is something like this:

var $WIDTH = 10;
print OUT <<__;
....
width: $WIDTHpx;
....
__

to print
....
width: 10px
....


What can be insert between the "$WIDTH" and the "px to make this work?

(don't want to break up the here-doc.

Thought of using $X = "" but that obviously doesn't work.
If there is a special variable (like $_)
that's == "", that might work.)
 
D

DJ Stunks

~greg said:
problem is something like this:

var $WIDTH = 10;
print OUT <<__;
...
width: $WIDTHpx;
...
__

to print
...
width: 10px
...


What can be insert between the "$WIDTH" and the "px to make this work?

\ (but it throws a warning)

-jp
 
G

~greg

right right, sorry! sorry!

(i did try {$WIDTH} first ...
--- and it didn't work .... duh..duh! )

thanks.
 
J

John Bokma

~greg said:
right right, sorry! sorry!

(i did try {$WIDTH} first ...
--- and it didn't work .... duh..duh! )

greg, don't top post but reply underneath the part you're replying to.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top