Hi guys, The following code is used by my site to output "Yes" or "No" depending on if the listing is "featured". I think it normally displays "1" or "0" for yes and no, but the language bit converts the numbers to text (the _CMN_YES : _CMN_NO bit) Anyway, my question, how can I stop it from displaying the yes/no and instead of 1, display an image and if the value = 0 nothing is displayed? Thanks for you help! RJP1 elseif ($key == "featured") { if (!$caption[$key]->hideCaption) { echo '<span class="hp_caption">'.$caption[$key]->caption."</span>: "; } echo $caption[$key]->prefix_text . ( ($value == '1') ? _CMN_YES : _CMN_NO ) . $caption[$key]->append_text . "<br />"; } // End if (featured) Code (markup):
It seems your code is outputting html, so you cannot directyl output an image, but you can output an <img> tag pointing to the image.
try this ... elseif ($key == "featured") { if (!$caption[$key]->hideCaption) { echo '<span class="hp_caption">'.$caption[$key]->caption."</span>: "; } echo $caption[$key]->prefix_text . ( ($value == '1') ? '<img src="[COLOR="Red"]{your image here}[/COLOR]">' : '' ) . $caption[$key]->append_text . "<br />"; } // End if (featured) Code (markup): you can also get rid of $caption[$key]->prefix_text and $caption[$key]->append_text if you don't need it.