I'm using CodeIgniter to insert an image into an empty div tag and I'm having some trouble putting php code within a an echo. I've been trying to figure it out but I just can't seem to get my head around why it's not working.
<?php
echo ('<div class="badge"><img src="<?php echo base_url("images/profiles/badge100.png"); ?>" title="100% on a quiz!" alt="100% on a quiz!"/></div>');
?>
I thought using "..." inside of '...' was the right thing to do. But obviously not. The following is what it's coming out as on the actual HTML page.
<div class="badge">
<img src="?><?php echo base_url(" images="" profiles="" badge100.png");="" ?=""><!--?php " title="100% on a quiz!" alt="100% on a quiz!"/-->
</div>
I appreciate your help!
Lewis.