Copying array segments
| From: | Lon Lentz | Date: | Fri, 04 Oct 2002 23:58:57 +0000 |
| Subject: | Copying array segments | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-118916@lists.php.net to get a copy of this message | ||
I've got an array that is 5 arrays deep, and I want to copy the array
three levels down of one index into a new array.
Example:
$output['recommendernames'][0]['recommendername'][0]['com'];
This is what I want to do:
$newoutput = $output['recommendernames'][0]['recommendername'];
So that newoutput is an array that is two arrays deep:
$newoutput[0]['com']
Is there a special function for this?
__________________________
Lon Lentz
Applications Developer
EXImpact.com