Skip to content

Instantly share code, notes, and snippets.

@taishi41228
Created March 10, 2013 04:43
Show Gist options
  • Save taishi41228/5127151 to your computer and use it in GitHub Desktop.
Save taishi41228/5127151 to your computer and use it in GitHub Desktop.
PHP入門 配列(array) 基本編 ref: http://qiita.com/items/b63fb1797aa1be0b3cd0
$array = array(1, 2, 3, 4, 5);
print_r($array);
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 )
Array (
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => 5
)
$array[インデックス番号]
$array = array('first' => 1, 2, 3, 4, 'final' => 5);
Array (
[first] => 1
[0] => 2
[1] => 3
[2] => 4
[final] => 5
)
$array[キー]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment