I have an array (a line of an csv file). This array contains the following data (var_dump($rowData)).
array(8) {
["Kategorie"]=>
string(12) "Bio- Bäcker"
["Name"]=>
string(31) "A nice name"
["Adresse"]=>
string(27) "the street 13"
["PLZ"]=>
string(5) "08056"
["Ort"]=>
string(7) "Zwickau"
["Tel"]=>
string(14) "0375/390 xxx"
["Mail"]=>
string(24) "[email protected]"
["Website"]=>
string(27) "http://doktor-xxx.xx/"
}
By getting values by running $rowData['key'] I get an error - but only by the first array key (Kategorie). PHP is telling me, the key doesn't exists.
I tried something around, all other keys are callable, but not the first.
$profileName = $rowData['Name'];
$profileAddress = $rowData['Adresse'];
$profileZip = $rowData['PLZ'];
$profileCity = $rowData['Ort'];
$profilePhone = $rowData['Tel'];
$profileWebsite = $rowData['Website'];
$profileMail = $rowData['Mail'];
$profileCategory = $rowData['Kategorie'];
Just don't know what's wrong with my code...
$rowData->Kategorieit might work that way insteadvar_dump(array_keys($rowData))to see if the key length matches what you expectKategorieis definitely not 12 characters; looks like a charset discrepancy to mearray_keys(.....)(I assume).