0

I am trying to retrieve image using the image path (which saved in the database) in the array index.

like-

< img src= "< ? php echo base_url().$info['/assets/img/women_collection/2/main_image_gallery.jpg'];? >" / >

But it does not woring!.

plz help! .

2
  • What errors are you getting? Commented Jun 25, 2014 at 16:33
  • 1
    Please, pass your path as a parameter to base_url() Commented Jun 25, 2014 at 16:40

1 Answer 1

1

I assume $info is your database results?

Your array key should be the database table row.

$info['image']
Sign up to request clarification or add additional context in comments.

2 Comments

it's real foolishness !!! :P i was using the image path instead of using the database row!! the index should be the row of the database. like this- < img src= " < ? php echo base_url().$info['gallery_image']; ? > " / >
You're welcome. You should follow Brett's advice too, and pass this as a parameter to the base_url function.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.