How do I show something, for every 4th entry?
Posted: Tue Jan 07, 2014 5:40 am
I need to show a vertical line after a DIV, for every four entry.
I did do it like this:
But now there will be a random set up to an unforeseen figure.
I've since tried this:
But it errors saying
I did do it like this:
Code: Select all
if ($count == 4 || $count == 8 || $count == 12 || $count == 16 || $count == 20 || $count == 24 || $count == 28 || $count == 32 || $count == 36 || $count == 40 || $count == 44 || $count == 48 || $count == 52 || $count == 56) { }I've since tried this:
Code: Select all
$count ++;
if (!{$count} % 4) {}So how do I do it? I assume the latter means is asking if $count is dividable by 4.unexpected '{'