Do something every fifth time?


Posted on 16th Feb 2014 07:03 pm by admin

I'm trying to write a loop, but I want it to do something different after every fifth instance. Like, I want it do something like this:

Quoteecho $a1;
echo $a2;
echo $a3;
echo $a4;
echo $a5.$b;
echo $a6;
And so on.. any idea on how to do this?

No comments posted yet

Your Answer:

Login to answer
257 Like 33 Dislike
Previous forums Next forums
Other forums

max function question
Hi All
Ihave a table that holds shipment numbers and dates like this

select * from

Please Help my PHP Dating Function.
Hi everyone!

Well here is my code that displays this:

It works wonderful.


$_GET problem
Hi all,

Have a bit of a problem with a little piece of code, I am not sure if this should be

php mysql script to find record
Hi,

Currently I have a simple table with 4 columns. A, B, C, D

If I want to find all

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

Merger of 6 sister companies under one flagship company after go live
Dear Experts,
I need one help regarding Merger of sister companies of same group. currently we

PHP search multiple input field box help
I am having a problem with my search script. At current it will simply search by a selected date whi

Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages.

how to get values from $_Post with onchange="form.submit();"?
Hi, I have a form that submit to itself with a file upload field and two other hidden field values.<

form submit at godaddy?
Trying to test form submission at GoDaddy and it does not seem to work. Here's the page...

h

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash