I want to break to a new line after each 6th record but it only breaks after 5th record and leaving the 6th record on a own line (see picture below).
for($i = 1; $i < 13; $i++) {
echo '<div style="display: '.($i % 6 == 0 ? '' : 'inline-').'block; padding: 0 10px;"></div>';
}
What am I doing wrong here? How can I fix it?