Can't seem to escape character from PHP date();
date, escaping, php
Solution
PHP will interpret the `\n` as a newline character. To escape that, simply add an extra slash:
date("h:i A \o\\n m/d/y");
Outputs:
04:06 AM on 08/06/13
Live demo: http://codepad.org/oI6rIyTq
Problem
I'm trying to make date equal something like: Posted at 06:55 PM on 8/5/13. However I can't seem to get the "on" part work correctly. I've tried backslashing the characters I want, but everytime something like this happens: `06:55 PM o 8/5/13` I can't seem to get the "n" to show up. This is what I have: ``` date("h:i A \o\n m/d/y"); ``` According to the php manual website this should work. Help me out? Thanks.