ok, una cosa di qst tipo allora:

$chiave="a";
$valore="1";
$temp[$chiave]=$valore;
$chiave="b";
$valore="2";
$temp[$chiave]=$valore;