How to explain this assignment principle of php two-dimensional array?

when reading other people"s code in the material, I found a way to assign values to php two-dimensional arrays. Here is a simple example

$call["a"][]="1";
$call["a"][]="2";

the result of this assignment is

array (size=1)
  "a" => 
    array (size=2)
      0 => string "1" (length=1)
      1 => string "2" (length=1)

I want to know what the principle is.

Php
May.13,2021

read more documents

clipboard.png


this has nothing to do with two-dimensional arrays, which can be written as $arr [] = 'specific value', which can be understood as a process of stacking, and the subscript will be added in the order of 0, 1, 2, etc. (if it is originally a non-associative subscript)


this has nothing to do with the principle, right? Array basic assignment. It is generally used to append elements through the body of the loop.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b35ca8-2bfb5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b35ca8-2bfb5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?