PHP Function to Detect if the visitor is on an Android Device

Php function which scans the user agent for the word “android” and returns true if found. Useful if you only want android visitors to see something.

function isItAndroid()
{
	$ua = strtolower($_SERVER['HTTP_USER_AGENT']);
	if(stripos($ua,'android') !== false) return true;
	else return false;
}