Parse Mobile
Function: parseMobile
Visibility: public static
Parameter: parseMobile($userAgent)
Description:
Users are surfing the world wide web from the wild world with various and enormous number type of devices, some of them are desktop and some are mobile. This function will detect mobile from desktop. It search for mobile strings out of user agent data, based on predefined data entered on: mobileNames.
Parameters:
(required) - string - userAgent - The user agent string.
Return:
array|false - The mobile name found. If not will return false.
Callable from (extended classes):
application: controller,view
advanced: controller,view
operators: controller,view
api: controller,view
example: 1
We want to get name of the mobile (if any) from the user agent string.
How to call (example):
Possible outcome (example):
Output: