How i can detect Iphone and ipad separately using php
<p>Is their any way to detect mobile browsers for iphone and ipad separately using PHP. I have used this code but iam getting same value for iphone and ipad</p>

<pre><code>$isMobile = (bool)preg_match('#\b(ip(hone|od|ad)|android|opera m(ob|in)i|windows (phone|ce)|blackberry|tablet'.'|s(ymbian|eries60|amsung)|p(laybook|alm|rofile/midp|laystation portable)|nokia|fennec|htc[\-_]'.
'|mobile|up\.browser|[1-4][0-9]{2}x[1-4][0-9]{2})\b#i', $_SERVER['HTTP_USER_AGENT'] );
</code></pre>
