Thread: HTML within PHP
View Single Post
Old 12-23-2007, 08:47 PM   #1 (permalink)
Zap
Human Tripod
 
Zap's Avatar
 
Join Date: 01-15-06
Location: WEBTALKFORUMS.COM
Posts: 9,980
iTrader: 0 / 0%
Latest Blog:
Great Short Film

Zap is supreme webmaster materialZap is supreme webmaster materialZap is supreme webmaster materialZap is supreme webmaster materialZap is supreme webmaster materialZap is supreme webmaster materialZap is supreme webmaster materialZap is supreme webmaster materialZap is supreme webmaster materialZap is supreme webmaster materialZap is supreme webmaster material
Question HTML within PHP

I have the following code that is inserted into a Wordpress theme file.

As you can imagine, it's not outputting correctly. I am no coder so I need some help with this. The following code should (hopefully) determine the country a visitor is from and display the appropriate banner to them.

PHP Code:
<?php
$country 
wp_ozh_getCountryName(0) ;
switch (
$country) {
   case 
"Canada" :
<
a target="_blank" href="http://www.affiliate.com/fs-bin/click?id=referrer_ID"><IMG alt="Canadian Banner" border="0" src="http://images.affiliate.com/outsidebanners/Homepage-120X600.gif"></a><IMG border="0" width="1" height="1" src="http://ad.affiliate.com/fs-bin/show?id=referrer_ID">;
        break;
   default :
<
a target="_blank" href="http://www.affiliate.com/fs-bin/click?id=referrer_ID"><IMG alt="American Banner" border="0" src="http://images.affiliate.com/outsidebanners/Homepage-120X600.gif"></a><IMG border="0" width="1" height="1" src="http://ad.affiliate.com/fs-bin/show?id=referrer_ID">;
}
?>
The code that determines the country is working fine when I substitute the html banner links with the echo command. I just need someone to tell me how to include the html code with the correct syntax inside the php tags.

Thanks!
__________________
BIG Gaming Forum

Toronto Forum
Zap is offline   Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links