Like array_push() where we can push an element in to array. I want to push an hash [name,url] in to an array of hash.
I do not know, what do you need, but it you need to push pair of values into array, this may be your solution:
$hashes_array = array();
array_push($hashes_array, array(
'name' => 'something1',
'url' => 'http://www1',
));
array_push($hashes_array, array(
'name' => 'something2',
'url' => 'http://www2',
));
After that $hashes_array
should look like that (each element of the bigger array is array itself - associative array with two keys and two values corresponding to them):
[
['name' => 'something1', 'url' => 'http://www1'],
['name' => 'something2', 'url' => 'http://www2']
]