Page 1 of 1

display image in stead of text

Posted: Mon Oct 06, 2008 11:23 am
by stampertje
i am quite new to PHP so maybe this may sound like a stupid question, but i'll ggive it a try anyway.

on my site users can submit events via a form. these events should be listed in a table. in stead of displaying the country name, i would like to display the flag of each country in the column country. could anyone tell me how to do this?

i think it would be possible to do it this way, but there are many countries :?

Code: Select all

if (entry="BE") echo '<img src="link naar de afbeelding">'
thanks for your help

Re: display image in stead of text

Posted: Mon Oct 06, 2008 11:40 am
by onion2k
Give your images names like BE.gif, then use something like ...

Code: Select all

echo "<img src=\"$entry.gif\">";