Jump to content

pulling an array out of Multidimensional array.


Azarian

Recommended Posts

Lets say we have an multi array.

$somearray = array(
     'config1' =>(
          'seting1' => 'data',
          'seting2' => 'data',
          'seting3' => 'data',
          'seting4' => 'data'
     ),
     'config2' =>(
          'seting1' => 'data',
          'seting2' => 'data',
          'seting3' => 'data',
          'seting4' => 'data'
     ),

);

Whats the best way to pull a sub array out to its own array?  If I do this....

$new_array = $somearray['config2'];

When I echo $new_array it returns array but no data fields.  What am I missing here?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.