Jump to content

converting things


php_novice2007

Recommended Posts

Hi,

 

I've got 2 javascript variables, var myColour = "blue"; and var blue = "./images/blue.jpg";

 

And I want to create an image thumbnail <img src=" + ??? + "width=10 height=10>

 

where in ??? I want "./images/blue.jpg"

 

But I only know the value of myColour (Its actually a value extracted from a text file). (it might not be blue, might be red, green, etc... and I have var red = "./images/red.jpg" etc..)

 

How do I do the conversion..?

 

Thanks!

 

 

Link to comment
https://forums.phpfreaks.com/topic/64809-converting-things/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.