search

Home  >  Q&A  >  body text

PHP newline problem

I encountered a problem while reading PHP-related tutorial books. Please forgive me for being too clumsy. Forgive me for using a capitalized book title number instead of <>, otherwise a line break will be automatically displayed.
echo "a: [".(20>9)."]《br》";
The above is a simple Boolean expression
Why should the line break symbol of "br" be written in ""? And if it is written between "and;, an error will be reported?
(

大家讲道理大家讲道理2709 days ago858

reply all(2)I'll reply

  • 黄舟

    黄舟2017-06-29 10:10:44

    你要明白為什麼寫在""雙引號內,由於寫起雙引號內,編譯才會視<br>為字符串輸出出來。但在引號外,<br>不是變量和常量,所以就是出現報錯!

    reply
    0
  • 迷茫

    迷茫2017-06-29 10:10:44

    You can echo "a:[.(20>9)."], '<br>';

    reply
    0
  • Cancelreply