PHP detect a mobile device and display code accordingly

This is an old trick, but it’s still great to use especially in this case where your site visitors can click directly on their phone to call your business.

<?php
  <?php
function isMobileDevice() {
    return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link

Like us on Facebook below to reveal the rest of the content.

Leave a Reply

Your email address will not be published. Required fields are marked *