Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End download – Generate Filename from Field (Array)? Reply To: download – Generate Filename from Field (Array)?

#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");