I need both isset and !='' in a condition, if I dont use isset it gives warning and I need !='' for else condition. So I need to use both
below code works well but dont return else, but when I change isset($array['1']['name'] to ($array['1']['name'] !='' then it return else condition.
if(isset($array['1']['name'] )) {
$this->output('<li class="name">',$array['1']['name'],'</li>');
}
else{
$this->output('<li class="name">',$other,'</li>');
}
Combine
isset()withempty()using the&&operator