Method: browser::mobile

Checks if the user agent string is from a mobile device

Info

Syntax

browser::mobile($ua=null)

Parameters

Return (boolean)

True: mobile device, false: not a mobile device

Example


if(browser::mobile()) echo 'You are browsing with a mobile phone';