Re: note 11953 added to language.types.array.php

From: Date: Thu, 15 Mar 2001 01:19:08 +0000
Subject: Re: note 11953 added to language.types.array.php
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-12413@lists.php.net to get a copy of this message
eblade@blackmagik.dynup.net writes: > I've discovered that in PHP there's no way to concatenate arrays, built in. At least > that I can find? > > http://www.php.net/manual/en/language.types.array.php Use array_merge(). Your note has been removed. <?php error_reporting(E_ALL); $array_1 = array('one', 'two' => array('three', 'four' => 'five')); $array_2 = array('six' => 'seven', 'eight' => array('nine' => 'ten')); $array_1 = array_merge($array_1, $array_2); print_r($array_1); ?> -- +----------------------------------------------------------------+ |Torben Wilson <torben@php.net> Adcore Finland| |http://www.coastnet.com/~torben http://www.adcore.com| |Ph: 1.604.709.0506 torben@adcore.com| +----------------------------------------------------------------+

« previous php.notes (#12413) next »