Re: Array concatenation behaviour change

From: Date: Fri, 08 Oct 2004 10:30:31 +0000
Subject: Re: Array concatenation behaviour change
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-198941@lists.php.net to get a copy of this message
Can't you sort the array? On 8 Oct 2004, at 10:41, rich gray wrote:
Just a heads up on this change in array concatenation behaviour that could cause a few probs for some people... <? $arr1 = array(0 => 'Zero'); $arr2 = array(1 => 'One',2 => 'Two'); $arr2 = $arr1 + $arr2; echo phpversion().'<br />'; print_r($arr2); ?> this code produces on our provider's server... 4.2.3 Array ( [0] => Zero [1] => One [2] => Two ) and on my development server... 4.3.8 Array ( [1] => One [2] => Two [0] => Zero ) hth rich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#198941) next »