$data = array (
'id' => $_POST["id"],
'name' => $_POST["name"],
'email' => $_POST["email"]
);
Is there a single php function that can transform the array keys into variables having the value of the array value? For instance instead of echoing a value via echo $data['name'] I can simply use echo $name.
Please do not suggest solutions using foreach loops (if possible).