Arrays with NULL keys

后端 未结 3 513
鱼传尺愫
鱼传尺愫 2020-12-10 10:27

PHP trivia here.

If we declare an array like this:

 \'bar\', NULL => \'hello\' ]; ?>

We can ac

3条回答
  •  旧时难觅i
    2020-12-10 10:41

    I have found the possibility to have Null keys useful, when accessing db, using a class, which can use one of the column values as the key to the returned array. Some column values could be null.

提交回复
热议问题