note 76691 modified in migration5.incompatible by danbrown
| From: | danbrown@php.net | Date: | Sun, 03 Aug 2008 02:34:45 +0000 |
| Subject: | note 76691 modified in migration5.incompatible by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-143077@lists.php.net to get a copy of this message | ||
addition of the note on 07-Sep-2004 06:40
if you write down your code like this PHP5 will just work fine:
<?php
$array_1 =
array('key1'=>'oranges','key2'=>'apples');
$array_2 =
array('key3'=>'pears','key4'=>'tomatoes');
$array_3 = array();
$arr_gemerged = array_merge($array_1,$array_2,$array_3);
echo "result:<br>";
print_r($arr_gemerged);
echo "<br>";
?>
---
so you have to declare array_3 as array() instead of NULL
--was--
addition of the note on 07-Sep-2004 06:40
if you write down your code like this PHP5 will just work fine:
$array_1 =
array('key1'=>'oranges','key2'=>'apples');
$array_2 =
array('key3'=>'pears','key4'=>'tomatoes');
$array_3 = array();
$arr_gemerged = array_merge($array_1,$array_2,$array_3);
echo "result:<br>";
print_r($arr_gemerged);
echo "<br>";
---
so you have to declare array_3 as array() instead of NULL
http://php.net/manual/en/migration5.incompatible.php