Location: PHPKode > scripts > Mobile Detect > serbanghita-Mobile-Detect-68027f1/tests/mobile_useragents_vendorTest.inc.php
<?php

$title = 'mobile per vendor test';

$html .= '<table id="results" class="tablesorter" cellspacing="1" cellpadding="0">';
    $html .= '
<thead>
    <tr>
        <th>User-Agent</th>
        <th>isMobile</th>
        <th>isTablet</th>
        <th>isBrand</th>
    </tr>
</thead>
<tbody>';

foreach($mobilePerVendor_userAgents as $brand => $userAgents){

    $html .= '
    <tr>
        <th colspan="4" class="brand">'.$brand.'</th>
    </tr>
    ';

    foreach($userAgents as $userAgent){

        $detect->setUserAgent($userAgent);
        $isMobile = $detect->isMobile();
        $isTablet = $detect->isTablet();
        $isBrand  = $detect->is($brand);
        //$matchDesire = $detect->match('Android.*(Desire|ADR6200|001HT|HTCA8180|A320e)|HTC.*Desire|Desire([\w ]+)?HD|Desire([\w ]+)?S|Desire([\w ]+)?C|HTC_GOF_U');

        $html .= '<tr>';
            $html .= '<td>'.$userAgent.'</td>';
            $html .= '<td>'.($isMobile ? '<div class="true">true</div>' : '<div class="false">false</div>').'</td>';
            $html .= '<td>'.($isTablet ? '<div class="true">true</div>' : '<div class="false">false</div>').'</td>';
            $html .= '<td>'.($isBrand ? '<div class="true">true</div>' : '<div class="false">false</div>').'</td>';
        $html .= '</tr>';

    }

}

$html .= '</tbody></table>';
Return current item: Mobile Detect