I know I know, I should be using MySQL... I can't, CIS won't allow it. That aside:
I am taking a CSV file and sticking it in an array with the fopencsv. I have 5 'columns' in this csv file. In my loop that prints the data, how to I make it insert a line break after line 5?
I assume I have to check the incrementing value value to see if the last digit = 4 or 9 but how do I do that? This I copied from the man...
while ($data = fgetcsv ($fp, 1000, ",")) {
$num = count ($data);
$row++;
for ($c=0; $c<$num; $c++) {
print $data[$c];
}
}
I think I need to change it to something like:
while ($data = fgetcsv ($fp, 1000, ",")) {
$num = count ($data);
$row++;
for ($c=0; $c<$num; $c++) {
if (enddigit=(4;9) {
print $data[$c] . "<br>";
}else{
print $data[$c];
}
}
}
But I have no idea how to check that last digit.
Thnx for help.