I am using a for loop and switch to divide the groups up as shown below:
switch ($i)
{
case ($i >= $aStart && $i <= $aEnd):
$aValues = $aValues . $i . " = ". $letter . "<br>";
break;
case ($i >= $bStart && $i <= $bEnd):
$bValues = $bValues . $i . " = ". $letter . "<br>";
break;
case ($i >= $cStart && $i <= $cEnd):
$cValues = $cValues . $i . " = ". $letter . "<br>";
break;
}
The values for the comparitors are:
$aStart = 0 $aEnd = 4
$bStart = 5 $bEnd = 8
$cStart = 9 $cEnd = 12
Each time the results for the first run i.e when i=0 end up in the second group when it should clearly end up in the first.
It driving me mad.
here is the output:
1 = b
2 = c
3 = d
4 = e
0 = a
5 = f
6 = g
7 = h
8 = i
9 = j
10 = k
11 = l
12 = m
does anyone know why?
sametch
