Using "if statement" to echo value from database and transform into an image
-
HI,
I got my author profiles extended. They can say from which country they come. It is either The Netherlands or Germany (dropdown box).
Now I want to echo this value into the author page and turn either ‘Netherlands’ or ‘Germany’ into an image vlag.
I tried to do it with the if statement, so far I got:
<?php if( get_cimyFieldValue(get_the_author_ID(), 'LAND', treu) == 'Nederland' ) { ?> <div id="vlag"><img src="<?php bloginfo('template_directory'); ?>/images/nl-flag-small.png" alt="Deze tuin bevindt zich in Nederland" title="In Nederland"/></div> <?php } else { ?> <div id="vlag"><img src="<?php bloginfo('template_directory'); ?>/images/de-flag-small.png" alt="Deze tuin bevindt zich in Duitsland" title="In Duitsland"/></div> <?php } ?>Is there someone who can help me get on the right track? I just don;t see it at the moment. Tnx in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Using "if statement" to echo value from database and transform into an image’ is closed to new replies.