tronicsmasta Posted May 19, 2008 Share Posted May 19, 2008 Hey guys, I need to insert a break if they use IE and not if they use firefox thanks, quinton Quote Link to comment Share on other sites More sharing options...
DarkWater Posted May 19, 2008 Share Posted May 19, 2008 A break...? O_O Quote Link to comment Share on other sites More sharing options...
tronicsmasta Posted May 19, 2008 Author Share Posted May 19, 2008 eg: if (browser = IE) { echo "<br>"; } if (browser = Mozilla) { echo "whatever i need here"; } echo "$_SERVER['HTTP_USER_AGENT']"; // Outputs for Mozilla -- Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14 // or IE -- Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727) Quote Link to comment Share on other sites More sharing options...
DarkWater Posted May 19, 2008 Share Posted May 19, 2008 $browser = $_SERVER['HTTP_USER_AGENT']; if (strpos($browser, "MSIE")) { echo "<br />"; } elseif (strpos($browser, "Mozilla")) { //echo stuff } else { } //You can exclude this if you want, but w/e. Quote Link to comment Share on other sites More sharing options...
tronicsmasta Posted May 19, 2008 Author Share Posted May 19, 2008 Great Thanks! Quote Link to comment 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.