SyntaxFix
Write A Post
Hire A Developer
Questions
array_push($arr, ['key1' => $value1, 'key2' => value2]);
This works just fine. creates the the key with its value in the array