Method: browser::mobile
Checks if the user agent string is from a mobile device
Info
Syntax
browser::mobile($ua=null)
Parameters
- $ua (string) The user agent string
Return (boolean)
True: mobile device, false: not a mobile device
Example
if(browser::mobile()) echo 'You are browsing with a mobile phone';