note 46460 added to language.operators.array

From: Date: Tue, 12 Oct 2004 13:50:12 +0000
Subject: note 46460 added to language.operators.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-78406@lists.php.net to get a copy of this message
what I want to say is: ÔÚÊý×éµÄÔËËãÖÐthe result of (array1 = array2 + array3 )is different from (array1 = array3 + array2). for example: <?php $wang = array('1','2','3','5'); $zhang = array('11','2','5','8','9'); $added = $wang + $zhong; print_r($added); /*It will print Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 5 [4] => 9 )*/ //but the flllow is different $added = $zhong + $wang; print_r($added); /*It will print Array ( [0] => 11 [1] => 2 [2] => 5 [3] => 8 [4] => 9 )*/ ?> ---- Manual Page -- http://www.php.net/manual/en/language.operators.array.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+46460 Delete -- http://master.php.net/manage/user-notes.php?action=delete+46460&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+46460&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#78406) next »