Which doesn’t work so great. When I echo $image alone it shows the correct value (i.e. image1, image2, etc.), therefore I must be missing a quote or double quote or escape somewhere. I need another pair of eyes to see what I’m missing.
The problem is the single quotes in $row_rs_details['$image'] since variables in single quotes aren’t parsed. So instead of asking for ‘image1’, ‘image2’, etc, you’re litterally asking for the key ‘$image’, which doesn’t exist, for obvious reasons.
Also, if you use single quotes for the string you don’t have to escape double quotes within that string, which makes it look a lot nicer IMO. and it’s marginally faster as well, in case anyone cares
It didn’t work? Are you sure there is data in the rows?
The snippet I posted is the exact same as the first snippet in your post; they should behave exactly the same.
That worked, but mainly because I noticed that the image source was set to this forum for some reason (Don’t know how that got in there ) It isn’t in the original code, but when I copied and pasted yours it had the wrong url so of course it didn’t work. When I set the source to simply “images/[filename]” , presto!