Escape char handling in arguments
Posted: Mon Oct 06, 2008 8:32 am
Ok, example:
With the above, echoed to document, the linefeed, \n, works fine, but its pain in the ass to escape all the "'s in the string. And the one below, while more convenient, does not insert the linefeed to the document.
Why is this and what and where I could read about it. Googleing for single or double quote, escapes, leads me to nowhere...
Code: Select all
function xml() { return "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?> \n"; }
function doctype(){ return '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> \n'; }
Why is this and what and where I could read about it. Googleing for single or double quote, escapes, leads me to nowhere...