I have a simple detection for mobile devices and it works fine but it has gotten a bit bloated so I tried to put the list in an array. I don't get errors but it doesn't work. Here is what I tried
$useragents = array("iPhone","iPod","incognito","webmate","Android","dream","CUPCAKE","blackberry9500","blackberry9530","blackberry9520","blackberry9550","blackberry 9800","webOS","s8000","bada","Googlebot-Mobile");
if (in_array(1, $useragents)) {
$phones = strpos($_SERVER['HTTP_USER_AGENT'], $useragents);
}
if ($phones == true) { include_once './template/phones.php';}
Please assist