Welcome Guest, Not a member yet? Register   Sign In
IF Conditions statement not working in my controller
#1

I am new to Codeigniter. For some reasons if statement is not evaluating properly within my controller.
I will appreciate any help. See my code snipet below

public function states(){
$this->load->view('sap/header');

$state = str_replace ("%20", " ", $this->uri->segment(3, 0));
$lga =  str_replace ("%20", " ", $this->uri->segment(4, 0));
$pms = str_replace ("%20", " ", $this->uri->segment(5, 0)); //plazas markets and shops


$data['state'] = $state;
$data['lga'] = $lga;
$data['pms'] = $pms;
//$data['plaza'] = $plaza;

$id = $this->welcome_model->getStateID($state);
$stateid = $id[0]['state_id'];



//$lgaid = $lgaid[0]['lga_id'];

if(!($plaza === 0)){

}
//
elseif(!($lga=== 0)){

}
else (!($pms === 0)){

}

$this->load->view('sap/footer');
}
Reply


Messages In This Thread
IF Conditions statement not working in my controller - by ezenna - 05-16-2016, 10:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB