Hallo zusammen,
ich habe eine mehrdimensionale Array und bekomme beim Auslesen den Fehler:
Warning: Only the first byte will be assigned to the string offset in ....... (1. Zeile $Wert['idli'])
var_dump($ArrayIdLiPlus)
array(1) { [0]=> array(4) { ["artnr"]=> string(7) "5048674" ["idli"]=> string(3) "5-2" ["menge"]=> string(2) "10" ["wanr"]=> string(7) "9721321" } }
Steh gerade auf dem Schlauch.
Kann mir jemand sagen, was da falsch ist?
Gruß
Falke07
ich habe eine mehrdimensionale Array und bekomme beim Auslesen den Fehler:
Warning: Only the first byte will be assigned to the string offset in ....... (1. Zeile $Wert['idli'])
var_dump($ArrayIdLiPlus)
array(1) { [0]=> array(4) { ["artnr"]=> string(7) "5048674" ["idli"]=> string(3) "5-2" ["menge"]=> string(2) "10" ["wanr"]=> string(7) "9721321" } }
PHP-Code:
// Sotriern nach artnr
$ArtNrLiPlus = array_column($ArrayIdLiPlus, 'artnr');
array_multisort($ArtNrLiPlus, SORT_ASC, $ArrayIdLiPlus);
// auslesen
foreach($ArrayIdLiPlus as $Row => $Wert) {
$IdLiPlus[$Row] = $Wert['idli'];
$ArtNrPlus[$Row] = $Wert['artnr'];
$MengePlus[$Row] = $Wert['menge'];
$WaNrPlus[$Row] = $Wert['wanr'];
$IdLiPlus2 = $IdLiPlus[$Row];
$ArtNrPlus2 = $ArtNrPlus[$Row];
$MengePlus2 = $MengePlus[$Row];
$WaNrPlus2 = $WaNrPlus[$Row];
echo '....';
}
Kann mir jemand sagen, was da falsch ist?
Gruß
Falke07
Kommentar