lovephp Posted November 9, 2012 Share Posted November 9, 2012 guys im trying to name the converted file into date.csv but all i get is $today.csv $today = date("d-m-y"); header('Content-Type: text/csv'); header('Content-Disposition: attachment;filename=$today.csv'); Link to comment https://forums.phpfreaks.com/topic/270514-unable-to-name-file-with-date/ Share on other sites More sharing options...
DavidAM Posted November 9, 2012 Share Posted November 9, 2012 Variables are not interpreted in single-quote delimited strings. Use double-quotes header("Content-Disposition: attachment;filename=$today.csv"); Link to comment https://forums.phpfreaks.com/topic/270514-unable-to-name-file-with-date/#findComment-1391357 Share on other sites More sharing options...
lovephp Posted November 9, 2012 Author Share Posted November 9, 2012 oh yes thanks soo much Link to comment https://forums.phpfreaks.com/topic/270514-unable-to-name-file-with-date/#findComment-1391358 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.