Home › Forums › Back End › download – Generate Filename from Field (Array)? › Reply To: download – Generate Filename from Field (Array)?
August 4, 2014 at 2:34 am
#177464
Ilan Firsov
Participant
In the example you have tried you have a missing single-quote'
. either fix the concatenation (and missing quote), or change the single-quote to double-quotes and change the brackets to curly brackets {}
either way should work:
header('Content-Disposition: attachment; filename=' . $tcgname[$i] . '.png'); //the brackets are not required here
or
header("Content-Disposition: attachment; filename={$tcgname[$i]}.png");