Home  >  Q&A  >  body text

$aa[bar] will report an error, right? PHP will consider bar as a constant.

$aa[bar] will report an error, right? PHP will consider bar as a constant

红月红月1576 days ago1215

reply all(2)I'll reply

  • 手机用户1628658718

    手机用户16286587182021-08-11 15:33:35

    If you don’t add single quotes, there will be no error, and the results will be output as usual, but there will be a warning to remind you to add single quotes

    reply
    0
  • Tngtion

    Tngtion2020-07-21 09:04:02

    Variables with $

    Strings with quotes

    That’s either an array, a constant or a built-in function, right?

    reply
    0
  • Cancelreply