mcmuney Posted February 12, 2008 Share Posted February 12, 2008 I'm looking to write a if/then statement with browser, but not sure how to pull browser data, this is what I'm looking for: if ($browser=="IE"){ echo "A"; } echo "B"; }; Quote Link to comment https://forums.phpfreaks.com/topic/90746-ifthen-statement-with-browser/ Share on other sites More sharing options...
revraz Posted February 12, 2008 Share Posted February 12, 2008 http://us3.php.net/function.get-browser Quote Link to comment https://forums.phpfreaks.com/topic/90746-ifthen-statement-with-browser/#findComment-465166 Share on other sites More sharing options...
mcmuney Posted February 12, 2008 Author Share Posted February 12, 2008 I've tried $_SERVER['HTTP_USER_AGENT'] , but this pulls a long string, I just need to know if the browser is IE or not, that's it. Quote Link to comment https://forums.phpfreaks.com/topic/90746-ifthen-statement-with-browser/#findComment-465178 Share on other sites More sharing options...
revraz Posted February 12, 2008 Share Posted February 12, 2008 Read the examples on the page. Quote Link to comment https://forums.phpfreaks.com/topic/90746-ifthen-statement-with-browser/#findComment-465185 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.