0

Hello, am working with the date function in a php file, however the text "at" is not being rendered properly:

Initial code:

"Online reservation form submitted on " . date ("d/m/y \at\ H:i") . "\n\n" .

Rendered value:

Online reservation form submitted on 29/09/12 a30 11:52

Where instead of "at" it is becoming "a30". How to fix this?

4
Contributors
6
Replies
8
Views
5 Years
Discussion Span
Last Post by Ritesh_4
0

I tried that but it instead worked as a "tab" space added to the resulting text

2

a and t are format characters in the date function. If you want to use them as text (literally) you must escape each of them.

Edited by broj1

1

date ('d/m/y \a\t H:i');

OR

date ('d/m/y').' at '.date('H:i');

Edited by Bachu

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.