@NogDogApr 23.2016 — #If you really feel compelled to use all the concatenation of separate lines with explicit newlines ("n"), then: [code=php] " </>n". " <style type="text/css">n". " .#myclass1 a{padding: 0;}n". " .mybodyody{width: 100%;}n". " </style>n". [/code] But that's a lot of added typing/complexity to no real gain, in my opinion. You could simple do something like this, assuming it's part of an echo statement: [code=php] echo " </> <style type="text/css"> .#myclass1 a{padding: 0;} .mybodyody{width: 100%;} </style> "; [/code] But even easier is to simply exit PHP mode at that point, since you're only outputing HTML/CSS at that point: [code=php] <?php // some PHP code, then... ?> </> <style type="text/css"> .#myclass1 a{padding: 0;} .mybodyody{width: 100%;} </style> <?php // some more PHP code... ?> [/code]
How to solve also such examples: [code=php] " @media screen and (max-width: 787px) {n". " table [class="myclass1"]{width:100% !important;}n". "}n". [/code]
@NogDogApr 24.2016 — #If you are going to have literal double-quotes inside of a double-quoted string, then you have to escape them with a back-slash. [code=php] $foo = "This string uses "quotes" inside of it."; [/code] If you find yourself doing lot's of escaping, HEREDOC syntax can be useful. [code=php] // instead of this: $foo = "Some text with "quotes" andn" . "hard-coded newlines.";
// you could do: $foo = <<<EOD Some text with "quotes" and hard-coded newlines. EOD;