Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2010
    Posts
    713
    Thanks
    165
    Thanked 0 Times in 0 Posts

    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:
    PHP 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

  • #2
    Regular Coder
    Join Date
    Aug 2010
    Posts
    713
    Thanks
    165
    Thanked 0 Times in 0 Posts
    How can I add this code:

    PHP Code:
    $this->csvUploadPaymentDetails[0]['week_num'
    with this code:

    PHP Code:
    $Mail->Subject 'Preview/' $this->csvUploadPaymentDetails[0]['csvfilename'] .'/'.date('d-m-Y'); 
    to make the subject become:

    Preview/Filename/Date/Week No

    Thank you

  • #3
    Regular Coder
    Join Date
    Jul 2010
    Location
    Sheffield
    Posts
    827
    Thanks
    93
    Thanked 18 Times in 18 Posts
    Does this not work?

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

  • #4
    Regular Coder
    Join Date
    Aug 2010
    Posts
    713
    Thanks
    165
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by tomharto View Post
    Does this not work?

    PHP Code:
    $Mail->Subject 'Preview/' $this->csvUploadPaymentDetails[0]['csvfilename'] .'/'.date('d-m-Y').'/'.$this->csvUploadPaymentDetails[0]['week_num']  ; 
    It work's..

    Thank you


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •