Update php.html.markdown

Added reference to add an element to an associative array.
This commit is contained in:
Patrick Lee 2016-02-18 15:59:00 -05:00
parent a08051109f
commit 663f6e28f5

View File

@ -146,6 +146,9 @@ echo $associative['One']; // prints 1
$array = ['One', 'Two', 'Three'];
echo $array[0]; // => "One"
// Add an element to an associative array
$array['Four'] = 4;
// Add an element to the end of an array
$array[] = 'Four';
// or