Concept

How can key-value pairs be initialized in a PHP array?

ComputerScienceOne / Non-Contiguous Indices

"Since associative arrays in PHP can be indexed by either integers or strings and need not be ordered or contiguous, we can use a special key-value initialization syntax to define not only the values, but the keys that map to those values when we initialize an array. The “double arrow,” => is used to denote the mapping.\n\n1 $arr = array(\n\n2 \"foo\" => 5,\n\n3 4 => \"bar\",\n\n4 0 => 3.14,\n\n549"

Related Ideas

How can key-value pairs be initialized in a PHP array? | ComputerScienceOne | Bifalgorithm | Bifalgorithm