Add code for today date in my php class/function

Good day!

I want to know what is the syntax for date(dd-mm-yyyy) and how can I insert it to my code:


$Mail->Subject = 'Preview/' . $this->csvUploadPaymentDetails[0]['csvfilename'];

Sorry, because I’m not familiar with class and function.

i want toe result is Preview/Filename/Date/

Thank you so much


$Mail->Subject = 'Preview/' . $this->csvUploadPaymentDetails[0]['csvfilename'] .'/'.date('dd-mm-yyyy'); 

:slight_smile:

Check out the manual page for [fphp]date[/fphp], it’s pretty comprehensive.

is it the same with this code


$Mail->Subject = 'Preview/' . $this->csvUploadPaymentDetails[0]['csvfilename'] .'/'.date('d-m-Y'); 

Thank you

How can I add this code:


$this->csvUploadPaymentDetails[0]['week_num']

with this code:


$Mail->Subject = 'Preview/' . $this->csvUploadPaymentDetails[0]['csvfilename'] .'/'.date('d-m-Y'); 

to make the subject become:

Preview/Filename/Date/Week No

Thank you

is this the code for date is correct?not d’m’Y?ahm how about my code for week no how can I add that in my code:


$Mail->Subject = 'Preview/' . $this->csvUploadPaymentDetails[0]['csvfilename'] .'/'.date('dd-mm-yyyy')

Thank you

see post #3 and follow the link Anthony gave you.