How do I manage column in PHP?


I want to do that I want to fetch image from database and display on a page in 4 columns after 4 columns, it should be automatic in the next row. How to fetch and display image in PHP on page? How to make auto row after 4 columns (images)? Help me please.

How is the image stored in the database? BLOB or reference to a file?

In regards to the layout, have a look at the Bootstrap grid system: