Zaxnyd Posted June 26, 2006 Share Posted June 26, 2006 I need to push items and a reference key into an array, essentially an associative version of array_push(). I haven't been able to find a way to do this. If anyone could assist, I'd appreciate it. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/12962-associative-array_push/ Share on other sites More sharing options...
adamwhiles Posted June 26, 2006 Share Posted June 26, 2006 Not sure if this will work but its worth a shot[code]$stack = array("orange"=>23, "banana"=>65);array_push($stack, "apple"=>43, "raspberry"=>64);print_r($stack);[/code] Link to comment https://forums.phpfreaks.com/topic/12962-associative-array_push/#findComment-49840 Share on other sites More sharing options...
Zaxnyd Posted June 26, 2006 Author Share Posted June 26, 2006 Sadly, it does not. Link to comment https://forums.phpfreaks.com/topic/12962-associative-array_push/#findComment-49844 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.