Bastien, thanks very much for all your help. I really appreciate, we are almost there, however the output now is only showing the last four elements of the array, and not all eight.
ex)
for($s=0;$s<count($pieces);$s+=4) {
print $pieces[$s].","; //to ensure that the spaces are being removed
$values = "INSERT INTO results (skill, has_skill, confident, training) VALUES ('".$pieces[$s]."','".$pieces[$s+1]."','".$pieces[$s+2]."','".$pieces[$s+3]."');";
echo $values; //to test the input statement
//do inserts
}//close loop
output:
Word,YES,YES,YES,WordPerfect,NO,NO,NO
INSERT INTO results (skill, has_skill, confident, training) VALUES ('WordPerfect','NO','NO','NO');
Is it possible to place the $s increment to the bottom of the loop or place the entire loop into a do/while loop? I have tried this but did not get the results expected, there fore I think I might not have it coded correctly.
thanks,
Scott
do {
for($s=0;$s<count($pieces);$s++) {
print $pieces[$s].",<br><br>"; //to ensure that the spaces are being removed
$values = "INSERT INTO results (skill, has_skill, confident, training) VALUES ('".$pieces[$s]."','".$pieces[$s+1]."','".$pieces[$s+2]."','".$pieces[$s+3]."');";
echo $values; //to test the input statement
$s+=4;
}//close loop
//do inserts
$loopcounter++;
} while ($loopcounter <= count($pieces));