I have created empty array and want to push all values and its key to the new created array but I am getting error array_push() expects at least 2 parameters I know array_push needs two parameter and here I am passing only one but what I ant is all keys and values to be pushed directly to array
// Here 'userid' is just text or can say sample key and
// Here $userid is getting from table so expected output
// 'userid'=>$userid
$temp = array();
array_push($temp['userid'] = $userid);