Problem with adding text to emails using the date function

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Problem with adding text to emails using the date function

    Hi,

    using the folling line fo code i am trying to add some text to an email:

    $subject .= "\nBooking Commences: ".date("jS F Y \a\t H\:i",
    strtotime($booking_start_date));

    However the output is:

    Booking Commences: 24th September 2003 a 09:00

    I think the \t is being interpreted as a 'tab', how can i get around this?

    Thanks for your help
    Shaun Guest

  2. Similar Questions and Discussions

    1. #39245 [NEW]: date function generate wrong date with 1162083600 timestamp
      From: lohner at aldea dot hu Operating system: Linux PHP version: 5.1.6 PHP Bug Type: Date/time related Bug description: ...
    2. Help needed with a date function problem
      Hi everyone.. I have a custom tag titled "thisdate" My application calls for the week to end on Friday, so my date display looks like......
    3. Problem when sending emails with asp.net
      Hello all, I'm actually having some troubles when sending mails with a basic asp.net application, using System.web.mail class. My test machine...
    4. Newbie asking for help - Reading a text file of qurantined emails and parsing contents.
      Greetings. Please excuse this post if it is about something that is very simple or have been discussed before, as I am newbie in PHP, and failed...
    5. Date and text problem
      I have a text file called frontPage that loads text from external file. The external file has monthly variables with different text info for each...
  3. #2

    Default Re: [PHP] Problem with adding text to emails using the date function

    You are right, the same way as \n is interpreted as a newline. Use
    single quotes

    Shaun wrote:
    > Hi,
    >
    > using the folling line fo code i am trying to add some text to an email:
    >
    > $subject .= "\nBooking Commences: ".date("jS F Y \a\t H\:i",
    > strtotime($booking_start_date));
    >
    > However the output is:
    >
    > Booking Commences: 24th September 2003 a 09:00
    >
    > I think the \t is being interpreted as a 'tab', how can i get around this?
    >
    > Thanks for your help
    >
    Marek Kilimajer Guest

  4. #3

    Default Re: Problem with adding text to emails using the date function

    $subject .= "\nBooking Commences: ".date("jS F Y")." at ".date("H\:i")

    Shaun wrote:
    > Hi,
    >
    > using the folling line fo code i am trying to add some text to an email:
    >
    > $subject .= "\nBooking Commences: ".date("jS F Y \a\t H\:i",
    > strtotime($booking_start_date));
    >
    > However the output is:
    >
    > Booking Commences: 24th September 2003 a 09:00
    >
    > I think the \t is being interpreted as a 'tab', how can i get around this?
    >
    > Thanks for your help
    Pete M Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139