Skip to content

Instantly share code, notes, and snippets.

@eddiezane
Created November 11, 2014 05:34
Show Gist options
  • Save eddiezane/21c30ecf2f3a96b38392 to your computer and use it in GitHub Desktop.
Save eddiezane/21c30ecf2f3a96b38392 to your computer and use it in GitHub Desktop.
<?php
// They can behave like you'd expect an array to..
$myArray = array("Cats", "Dogs");
echo $myArray[0];
// Cats
// ..or like a hashmap!
$myArray = array("name" => "Eddie", "location" => "Brooklyn, NY");
echo $myArray["name"];
// Eddie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment