I need to have this output
Array
(
[id:>] => 0
[isonline] => 0
[userclass_id] => 3
)
and I am getting this output with this code:
$pr = array('id:>'=>$id,'isonline'=>'0','userclass_id'=>'3');
print_r($params);
This is good. But i want to pop new elements to array one by one. While i am using this code:
$params = array();
array_push($params,array('userclass_id'=>'3')); // Members
array_push($params,array('isonline'=>'0')); // Online
array_push($params,array('id:>'=>$id));
I am getting this output:
Array
(
[0] => Array
(
[userclass_id] => 3
)
[1] => Array
(
[isonline] => 0
)
[2] => Array
(
[id:>] => 0
)
)
I want to dynamically add new element but also want to have first output. Thanks for your helps.