0
I made a condition so that when there is no image in my database, return a standard image, however, I am having a small problem in my syntax and could not find a solution so far.
The problem is I’m not getting past my variable $user['photo'];
inside my echo
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>';
}
The problem is the
'
that you start the string and are breaking in the middle of it.– Inkeliz