Pass a PHP string to a JavaScript variable (and escape newlines) [duplicate] Pass a PHP string to a JavaScript variable (and escape newlines) [duplicate] php php