When I run the following
foreach($csv as $row) {
if (!in_array($row[2], $institutions)) {
$institutions[$row[2]] = $row;
}
I get no errors, but when I run this
foreach($csv as $row) {
if (!in_array($row[2], $institutions)) {
$institutions[$row[2]][] = $row;
}
}
I get this error
Premature end of script headers: php5
What is wrong with my code? What I'm trying to do is store all rows from the $csv array into subarrays, with the key being the institution name.