?name="" value in php

PHP
$id = 1;
$age = 2;    
$sort = "id"; // or "age";
    $Key = $$sort;
$arr = array($Key => 'string');

print_r($arr);
Source

Also in PHP: