Gossamer Forum
Quote Reply
Zones
Hello,

I want to realise different (4) colors in different categories:

I tried it this way:



$color1hotel = qq~FDF6DD

~;

In the category page I put:



elsif ($category_clean =~ /^Hotel/) {$Zonea="hotel"}

and then:

<td bgcolor="$color1$Zonea">&nbsp;</td>



There are 4 colors per category:

Result:

<td bgcolor="hotel">&nbsp;</td>



Please help.



Sincerly Yours



Mark

Quote Reply
Re: [MarkBT] Zones In reply to
your getting "hotel" because that's the value of $Zonea. You aren't getting anything else because $color1 is undefined. I'm assuming you actually are trying to combine the two variables together to get the value of $color1hotel? If that's the case, then what you want is:

Code:
print '<td bgcolor="' . ${'color1' . $Zonea} . '">&nbsp;</td>';

Philip
------------------
Limecat is not pleased.