I got a great response the last time I posted here.
I have the following table structure in my database for a small Gallery page on my site.
id | title | img1 | img1sml | img2 | img2sml | img3 | img3sml
Now, id and title are mandatory, however the rest are not.
I’d like to loop through all my sml columns that have values in them and create <img src="--column value here--" /> for each of them.
I’d also like to do the same with my img columns – loop through any non-empty columns and list them
Can someone show me how I can do this?
Many thanks for any help with this
You can check
NULLas follows