Hallo, ich komme nicht dahinter, was ich machen muss, damit der Fehler des undefined index endlich wegkommt. Hoffentlich hilft ihr mir da weiter. Probier schon seit Stunden rum, langsam habe ich keine Lust mehr....
Fehler kommt ab
für jede Zeile außer country
so funktionierts auch nicht....
Fehler kommt ab
PHP-Code:
"street" => $array[$i]['street'],
PHP-Code:
function prepareArraySparkasse($array, $entry)
{
$address=array();
$temp=array();
for($i=0;$i<count($array);$i++)
{
$temp = array(
"street" => $array[$i]['street'],
"ZIP" => $array[$i]['ZIP'],
'city' => $array[$i]['city'],
'country' => 'Deutschland',
'latitude' => $array[$i]['latitude'],
'longitude' => $array[$i]['longitude'],
'file' => $entry);
$address[$i] = $temp;
}
return $address;
}
PHP-Code:
for($i=0;$i<count($array);$i++)
{
$temp= array('street','ZIP','city','country','latitude','longitude','file');
$temp[$i]['street'] = $array[$i]['street'];
$temp[$i]['ZIP'] = $array[$i]['ZIP'];
$temp[$i]['city'] = $array[$i]['city'];
$temp[$i]['country'] = 'Deutschland';
$temp[$i]['latitude'] = $array[$i]['latitude'];
$temp[$i]['longitude'] = $array[$i]['longitude'];
$temp[$i]['file'] = $entry;
$address[$i] = $temp;
}

Kommentar