This question already has an answer here:
- CodeIgniter img tag 3 answers
I want to include an image alt attribute using PHP.
I currently have the following code...
<?php echo img(IMAGEPATH . 'logo.png'); ?>
How would I go about adding the alt attribute - "my awesome alt" - to this image using PHP so that when I go into view source I see something like this for the image?
<img src="http://examplesite.com/img/logo.png" alt="my awesome alt"/>
I am using codeigniter.
</div>