xwishmasterx Posted March 16, 2010 Share Posted March 16, 2010 Hello I am not really good at php or programming and I need a llittle help: I need a value to be "converted" to an image; so if the value is "eg.3" it should show eg. "img3.gif" (the images are stored in a folder) The value is displayed from: {case value="text"} {$extraField.value} So far it will show the value, but how can I make it display my image instead? Link to comment https://forums.phpfreaks.com/topic/195420-display-an-image-by-value/ Share on other sites More sharing options...
The Little Guy Posted March 19, 2010 Share Posted March 19, 2010 you could do this: $str = 'eg.3'; list($eg, $img) = explode('.', $str); echo $eg.' <img src="/images/img'.$img.'.gif" />'; Link to comment https://forums.phpfreaks.com/topic/195420-display-an-image-by-value/#findComment-1028427 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.