I have this two arrays
$views[] = $id;
$pid[] = $page_id;
which prints
Array
(
[0] => 9
[1] => 12
[2] => 13
[3] => 14
[4] => 15
)
Array
(
[0] => 174
[1] => 221
[2] => 174
[3] => 174
[4] => 174
)
now i want to create new array from this result like(first will be the key and second be the value)
Array
(
[9] => 174
[12] => 221
[13] => 174
[14] => 174
[15] => 174
)
I have tired array_push function but didnt work for me.