Azarian Posted April 12, 2015 Share Posted April 12, 2015 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? Link to comment https://forums.phpfreaks.com/topic/295478-pulling-an-array-out-of-multidimensional-array/ Share on other sites More sharing options...
Azarian Posted April 12, 2015 Author Share Posted April 12, 2015 I figured out what i was doing wrong print_r shows that it is working correct. Didn't realaize echo wouldn't echo out the whole array. Link to comment https://forums.phpfreaks.com/topic/295478-pulling-an-array-out-of-multidimensional-array/#findComment-1508861 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.