Forum Moderators: coopster
$useragent=getenv("HTTP_USER_AGENT");if ($useragent="MSIE") {header("Content-type: text/html");}
elseif ($useragent="Gecko") {header("Content-type: application/xhtml+xml");}
Whichever condition is first gets executed and obviously isn't what I want.
= is an assignment...
== means if the string includes
=== means the string is exactly
$string = set string
if $string == if mygeckostring contains "gecko" text
if $string === if string contains exact string
Anyway I am using == (as I accidentally posted =). I'd prefer that if someone responds that they have tested their answer out first please.