search

Home  >  Q&A  >  body text

In php, can both and. be used as connectors?

I watched Teacher Zhu’s introductory video today and found that sometimes I use echo key($arr).'=>'.current($arr).'<br>'; Sometimes I use echo key($arr) , '=>', current($arr), '<br>';, can all be parsed normally. Do the "." and "." here all function as connectors?

某年某月某日某年某月某日2626 days ago993

reply all(1)I'll reply

  • 路过

    路过2017-10-24 12:03:23

    The string concatenation character in php is "."

    echo can output multiple values ​​separated by ","

    reply
    0
  • 某年某月某日

    Thank you, God! They are both echo statements. Are the above two ways of writing legal? Is there a difference?

    某年某月某日 · 2017-10-24 12:24:28
    某年某月某日

    Which one is better to use that is more standardized?

    某年某月某日 · 2017-10-24 12:24:49
    路过

    Reply to a certain day of a certain year and a certain month: All are legal, otherwise an error will be reported. Don’t worry about it. Direct output is rarely used in real projects.

    路过 · 2017-10-24 16:57:42
  • Cancelreply