I am trying to use loop both vertically and horizontally. how to use it both?

attached is the sample screenshotCODE_SCREENSHOT.jpgSCREENSHOT.jpg

Need your help on this.

Thanks.!