Pushing to Multidimensional Arrays.

From: Date: Tue, 15 May 2001 09:44:28 +0000
Subject: Pushing to Multidimensional Arrays.
Groups: php.general 
Request: Send a blank email to php-general+get-52822@lists.php.net to get a copy of this message
How do i do this? I have tried using the array_push function without sucess and when i try this : $stack[]['id'] = $menuArray[$rowID]['id']; $stack[]['parentId'] = $menuArray[$rowID]['parentId']; $stack[]['name'] = $menuArray[$rowID]['name'];A obviously the array's internal pointer will increment and it will write to the next element. I suppose i could use prev() (could I?) but surely there has to be a better way ;) Thanks. Nick.

« previous php.general (#52822) next »