Associative arr (key=>value)
Array accessed with keys (like a dictionary).
Syntax
$name = ["key" => value];
Description
You use your own keys instead of numeric indices (using =>).
Example
Loading editor…
Expected output
Alex
When to use?
Structured data (user, product), JSON.