showing data into 4 :4 matrix

Certified Associate Developer

i am fetching data from record and i am showing this data in a card layout with foreach, so i want to show only 4 record in first row then 4 in second and so on. how can i achieve this through foreach in one interface

  Discussion posts and replies are publicly visible