My goal is to insert a variable’s value directly into a string without concatenation using the . operator.
I tried like this:
$filename = 'some_file_name';
header('Content-disposition: attachment; filename=$filename');
But this gives me filename=$filename, not filename=some_file_name.
How do I achieve this? What am I missing?
1 Answer