Hey Doug,
Thanks for your reply.
I have since managed to solve the problem. It has used a bit more code but does the job nicely
For anyone else who is having similar problems as me I have attached the code below.
for($count = 1; $count <= $_POST['installments'] {
list($d, $m, $y) = split("/", $insStart);
$unix = mktime(0,0,0,$m,$d,$y);
if($_POST['instFreq'] == "month") {
$end_date = date("d/m/Y",strtotime("+1 months",$unix));
}
if($_POST['instFreq'] == "quaterly") {
$end_date = date("d/m/Y",strtotime("+4 months",$unix));
}
if($_POST['instFreq'] == "biAnnual") {
$end_date = date("d/m/Y",strtotime("+6 months",$unix));
}
if($_POST['instFreq'] == "annual") {
$end_date = date("d/m/Y",strtotime("+12 months",$unix));
}
echo "<tr>";
echo "<td style='text-align:center;'>$count</td>";
echo "<td><input style='border:none; text-align:center' width:100%;' type='text' name='installmentDate[]' value='".$end_date."' /></td>";
echo "<td><input style='border:none; text-align:right' width:100%;' type='text' name='installmentValue[]' value='".number_format($installmentBase,2)."' /></td>";
echo "</tr>";
$insStart = $end_date;
$count++;
}