Change value = 1 to "Active" or value = 0 to "Inactive"
if (isset($active) == 1) {
$is_active = "Activo";
}
elseif(isset($active) == 0) {
$is_active = "Inactivo";
}
Just as it shows all as Active and there should be one inactive
You have to check two conditions, that the value exists "Y" that is equal to 1. Asi:
if (isset($active) && $active == 1) {
$is_active = "Activo";
}
elseif(isset($active) && $active == 0) {
$is_active = "Inactivo";
}