mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Merge pull request #2144 from patleeman/master
[php/en] Update php.html.markdown
This commit is contained in:
commit
a2848909ba
@ -142,6 +142,9 @@ $associative = ['One' => 1, 'Two' => 2, 'Three' => 3];
|
||||
|
||||
echo $associative['One']; // prints 1
|
||||
|
||||
// Add an element to an associative array
|
||||
$associative['Four'] = 4;
|
||||
|
||||
// List literals implicitly assign integer keys
|
||||
$array = ['One', 'Two', 'Three'];
|
||||
echo $array[0]; // => "One"
|
||||
|
Loading…
Reference in New Issue
Block a user