is_mobile([$key = NULL])
Parameters: |
|
---|---|
Returns: |
TRUE if the user agent is a (specified) mobile device, FALSE if not |
Return type: |
bool |
Returns TRUE/FALSE (boolean) if the user agent is a known mobile device.
1 2 3 4 5 6 7 8 9 10 11 12 | if ( $this ->agent->is_mobile( 'iphone' )) { $this ->load->view( 'iphone/home' ); } elseif ( $this ->agent->is_mobile()) { $this ->load->view( 'mobile/home' ); } else { $this ->load->view( 'web/home' ); } |
Please login to continue.