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.
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.