How to push both value and key into array with php
- by sombe
$GET = array();
$key = 'one=1';
$rule = explode('=',$key);
/* array_push($GET,$rule[0]=>$rule[1]); */
I'm looking for something like this so that:
print_r($GET);
/*output:*/ $GET[one=>1,two=>2,...]
is there a function to do this (because array_push won't work this way).
thanks!