4
What happens in the jeans_status
and jeans_opcao
it works a beauty more in the first if
It doesn’t work, it goes into the if
without checking whether the imagem_status == 1
and the imagem_opcao == 'galeria_imagem'
.
Someone might be able to explain to me what’s going on ?
<?php
// pd($imagens);
foreach ($imagens as $value) {
if (isset($value->imagem_status) == 1 and $value->imagem_opcao == "galeria_imagem") {
?>
<div class="portfolio-item col-md-3 code">
<figure>
<a class="example-image-link" href="<?php echo base_url('tema/assets/img/site/' . $value->imagem_link); ?>" data-lightbox="example-set" data-title="<?php echo $value->imagem_descricao ?>">
<div class="image-hover">
<img width="200px" height="200px" src="<?php echo base_url('tema/assets/img/site/' . $value->imagem_link); ?>" alt="<?php echo $value->imagem_titulo ?>">
<h5 class="margin-top-20"><?php echo $value->imagem_titulo ?></h5>
</div>
</a>
<div class="overlay">
</div>
</figure>
<div class="clearfix"></div>
</div>
<?php } elseif ($value->jeans_status == 1 and $value->jeans_opcao == "galeria_jeans") { ?>
<div class="portfolio-item col-md-3 code">
<figure>
<a class="example-image-link" href="<?php echo base_url('tema/assets/img/jeans/' . $value->jeans_link); ?>" data-lightbox="example-set" data-title="<?php echo $value->jeans_descricao ?>">
<div class="image-hover">
<img width="200px" height="200px" src="<?php echo base_url('tema/assets/img/jeans/' . $value->jeans_link); ?>" alt="<?php echo $value->jeans_titulo ?>">
<h5 class="margin-top-20"><?php echo $value->jeans_titulo ?></h5>
</div>
</a>
<div class="overlay">
</div>
</figure>
<div class="clearfix"></div>
</div>
<?php
}
}
?>
you’re not checking out if
imagem_status
is equal to1
you are checking whether theisset()
is1
(true)– rray