I made a condition that when there is no image in my database, I return a standard image, however, I am having a small problem in my syntax and I have not been able to find a solution so far.
The problem is that I am not able to pass my $user['photo'] variable inside my echo
This is my code
if(!empty($imagem_de_perfil) == null) {
echo '<img src="../../painel/public/images/no_image.png" alt="Imagem de perfil" width="160" height="120">';
} else {
echo '<div style="background: url(<?= base_url() ?><?= $user['photo'] ?>); position: relative; left: 48%; background-size: 48px 48px; width: 48px; height: 48px;" class="upload_photo upload_photo_user">
</div>';
}
