{$notes}" . PHP_EOL; $seconds = strtotime("{$dy} {$mo} {$yr} {$hour}"); $sqlReadings[] = "('A', {$seconds}, {$a})"; $sqlReadings[] = "('C', {$seconds}, {$b})"; $sqlReadings[] = "('B', {$seconds}, {$c})"; if(0 == $c) array_pop($sqlReadings); if(false === $notes) continue; $sqlNotes[] = "('note', {$seconds}, '{$notes}')"; } $sqlReadings = "INSERT INTO radonLog (id, time, reading) VALUES " . PHP_EOL . implode("," . PHP_EOL, $sqlReadings) . ";"; $sqlNotes = "INSERT INTO locationLog (id, time, description) VALUES " . PHP_EOL . implode("," . PHP_EOL, $sqlNotes) . ";"; echo $sqlReadings; //echo $sqlNotes;