I'm trying to push a key/value pair to an array like so:
$holders_array = array();
foreach ($holders as $holder) {
array_push($holders_array, "date" => $holder['date'], "holders" => $holder['holders']);
}
But I am getting the error:
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in
I see that you cannot push key-value pairs with array_push according to this link, however, I can't figure out how to get it right.
What do I need to do to push the key value pair to the array? Thanks!