On 20-05-2013 20:32, richard wrote:
> This does exactly what I want except that when 1969 is reached, the commas
> don't get placed where I want them.
> I need the commas on every line except for the last line.
> which is why I put the conditional just before the \n.
>
> $number=1;
> $number=(int)$number;
?? why this second assignment?
> while ($year<=1969):
i think an assignment to $number should be placed here....
> while ($number<=10):
...
> if ($year<1969 and $number<=10){echo ",";}
and a check to print "," based on "$number<=10" why?
this 'if' is placed in a 'while' loop with condition "$number<=10",
there should be no need to check if $number is <= 10....
> echo "\n";
> $number++;
> endwhile;
>
> $number=1;
aaah here is is, a better place would be just before the 'while'
> $year++;
>
> endwhile;
>