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"; }; 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 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. 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. Link to comment https://forums.phpfreaks.com/topic/90746-ifthen-statement-with-browser/#findComment-465185 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.