I could not figure out how to pass a variable number of variables into a function. I thought passing in an array and using the array keys for the variables names could repla
If you want just to output keys, you can do this without cycles:
$parameters = ["day" => 1, "month" => 8, "year" => 2010];
echo implode('
', array_keys($parameters));
Or output keys with values:
$parameters = ["day" => 1, "month" => 8, "year" => 2010];
echo implode('
', array_map(function($v, $k){ return $k.'='.$v;}, $parameters, array_keys($parameters)));