Mailinglisten-Archive |
Hallo Norbert,
Am Montag, 17. Juli 2006 11:25 schrieb Norbert Pfeiffer:
> array_merge() haengt den Wert an das Array _hinten_ dran.
Nein, daß macht array_merge() nicht. Das warst Du. Dreh mal die
Parameter um. ;-)
<?php
echo('<pre>');
$MyARR = array('ee'=>'Apfel', 'cc'=>'Ball', 'bb'=>'Ziegel');
$MyARR = array_merge($MyARR, array('aa'=>'Tisch'));
print_r($MyARR);
?>
<?php
$MyARR = array('ee'=>'Apfel', 'cc'=>'Ball', 'bb'=>'Ziegel');
$MyARR = array_merge(array('aa'=>'Tisch'), $MyARR);
print_r($MyARR);
?>
Viele Grüße
Lutz
php::bar PHP Wiki - Listenarchive