The following slices $scpar into two types one containing the first 9 and the second containing former comma separated values from 10 to 18.
$scpar9 = array_slice($scpar,0,9);
$scpar18 = array_slice($scpar,9,18);
We then use a foreach and use an id parameter $sid
to get the same comma separated value from other fields.
foreach ($scpar9 as $sid => $scpar) {
Information is then taken from other fields like this.
<b>'.$scpar.'</b> '.$sccomp[$sid].$scmen[$sid].
That all works fine, the problem is with the second 9 fields.
foreach ($scpar18 as $sid => $scpar) {
<b>'.$scpar.'</b> '.$sccomp[$sid].$scmen[$sid].
The field $scpar
is correct but the ones containing the [$sid]
are starting from the first result not the 9th.
Any ideas?
Marvellous