So i need it to run on the first loop and then every 3rd loop
if ($k % 3 || $k==1 ) { echo '<div class="modcontainer">'; }
Seems simple to me, but i don’t have the understanding of modulus
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Modulus returns the remainder, not a boolean value.
This code will resolve to
truefor1, 3, 6, 9, ...This code will resolve to
truefor1, 4, 7, 10, ...