Welcome Guest, Not a member yet? Register   Sign In
Calling img src and alt from database
#3

(10-16-2017, 03:04 AM)InsiteFX Wrote: What error are you getting?

Hi InsiteFX - thanks for the speedy reply!!

Dependent on what I've tried I get a range of errors, mostly parsing ones or just nothing on the page.

I've been for a coffee and taken another look and have managed to get them to display now using:

Code:
       <img src="<?php echo base_url(); ?><?php echo $accessories_item['imagesrc']; ?> " alt="<?php echo $accessories_item['imageAlt']; ?>" />

This displays the image and the source code of the rendered page is correct.

This has frustrated me over a couple of days but I want to get to grips with CodeIgniter as I can see massive efficiencies already over the Joomla site it will replace.

However, just because it works (and it "looks right" to me) I am keen to follow the "CodeIgniter way".

Therefore, I'm wondering if this follows convention or there is a better way?

Thanks again,

Alan
Reply


Messages In This Thread
Calling img src and alt from database - by alann - 10-16-2017, 02:23 AM
RE: Calling img src and alt from database - by alann - 10-16-2017, 03:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB