I made a controller for a web, this controller works between desktop and mobile user if user coming from mobile so it shows another view and if user come from desktop computer so it shows another view for that thing I made a code but when I upload a code on website and try to run it shows error this error:
Parse error: syntax error, unexpected T_ELSE in line 17
Here is my code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Welcome extends CI_Controller {
public function index()
{
$this->load->library('user_agent');
$this->load->helper('url');
if ($this->input->get("lang") =="en")
{
if ($this->agent->is_mobile())
{
$this->load->view('m_english_signup');
}
}
else
{
$this->load->view('d_english_signup');
}
else
$this->agent->is_mobile()
{
$this->load->view('m_arabic_signup');
}
else {
$this->load->view('d_arabic_signup');
}
}
}