PatPHP Posted July 4, 2008 Share Posted July 4, 2008 Hi I reckon it is very simple but I didn't find any solution yet. How can I add more values with key to an array? $aReturn = array(); $aReturn[] = array($aRow['id'] => $aRow['Type']); This adds arrays but then I have arrays in an array. Array should look like this: $aReturn[] = array("mist1" => "111", "mist2" => "222", "mist3" => "333"); Now how can I add more value to this array? Please "Value" + "Key". Thx Link to comment https://forums.phpfreaks.com/topic/113171-solved-add-value-key-to-an-array/ Share on other sites More sharing options...
DarkWater Posted July 4, 2008 Share Posted July 4, 2008 $array['key'] = $someValue; Link to comment https://forums.phpfreaks.com/topic/113171-solved-add-value-key-to-an-array/#findComment-581434 Share on other sites More sharing options...
PatPHP Posted July 4, 2008 Author Share Posted July 4, 2008 Thank you very much... so easy... I was searching too far. I love to learn new computer languages;-) Link to comment https://forums.phpfreaks.com/topic/113171-solved-add-value-key-to-an-array/#findComment-581495 Share on other sites More sharing options...
DarkWater Posted July 4, 2008 Share Posted July 4, 2008 Any time. =) Link to comment https://forums.phpfreaks.com/topic/113171-solved-add-value-key-to-an-array/#findComment-581499 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.