ironman32 Posted March 31, 2009 Share Posted March 31, 2009 I've been trying to figure out how to put an array list inside another array list. I was wondering if anyone knew how to do this or could give me an example. thanks Link to comment https://forums.phpfreaks.com/topic/151854-arrays-within-arrays/ Share on other sites More sharing options...
taquitosensei Posted March 31, 2009 Share Posted March 31, 2009 $array=array( array("whatever"=>"whatever"), array("somethingelse"=>"somethingelse") ); you can keep nesting like that almost infinitely. another way $array=array(); $array['subarray']['key1']="hmmm"; $array['subarray']['key2']="whatever"; Link to comment https://forums.phpfreaks.com/topic/151854-arrays-within-arrays/#findComment-797426 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.