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'); Quote 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"); Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.