ted_chou12 Posted February 11, 2007 Share Posted February 11, 2007 How do you put things into double array? an array looks like: array("test" => "go", "go" => "test"); what about when you want to put things for foreach? so: foreach(...) { $array[] = $string1 => $string2; } //this wouldnt work, but single array: foreach(...) { $array[] = $string1; } //works Can anyone help me get it right for the double array please? Thanks Ted Link to comment https://forums.phpfreaks.com/topic/38048-how-to-put-things-into-double-array/ Share on other sites More sharing options...
Jessica Posted February 11, 2007 Share Posted February 11, 2007 $array[$string1] = $string2; I swear you've asked this before. Link to comment https://forums.phpfreaks.com/topic/38048-how-to-put-things-into-double-array/#findComment-182139 Share on other sites More sharing options...
ted_chou12 Posted February 11, 2007 Author Share Posted February 11, 2007 yeah, i didnt get it last time, but got it working this time, thanks Ted Link to comment https://forums.phpfreaks.com/topic/38048-how-to-put-things-into-double-array/#findComment-182143 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.