Sometimes your data comes in two separate pieces. Maybe you read from a CSV file:
$headers = ['name', 'email', 'role'];
$row = ['Alice', 'alice@example.com', 'admin'];

To turn this into an associative array:
$user = array_combine($headers, $row);
/*
[
  'name' => 'Alice',
  'email' => 'alice@example.com',
  'role' => 'admin'
]
*/