note 18562 deleted from function.array-push by didou

From: Date: Tue, 29 Jul 2003 11:58:59 +0000
Subject: note 18562 deleted from function.array-push by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-52913@lists.php.net to get a copy of this message
Note Submitter: linuxbaby@yahoo.com ---- Interesting! Maybe $a[]=$b is NOT the same as array_push($a, $b) - when you want the VALUE of an array to also be an array. $a = array(); $b = array("one","example","array"); $c = array("another","silly","test"); $a[] = $b; /* ERROR */ $a[] = $c; /* ERROR */ but... array_push($a, $b); /* WORKS */ array_push($a, $c); /* WORKS */

« previous php.notes (#52913) next »