Detect IE with PHP

So I needed a different jQuery script to fire in IE… This is how I got it done. <?php    if (preg_match(‘~MSIE|Internet Explorer~i’, $_SERVER[‘HTTP_USER_AGENT’]) || (strpos($_SERVER[‘HTTP_USER_AGENT’], ‘Trident/7.0; rv:11.0’) !== false)) { ?>        $(window).load(function () {            // Some jQuery function to run         });<?php }?>found[…]