Created
March 10, 2013 04:43
-
-
Save taishi41228/5127151 to your computer and use it in GitHub Desktop.
PHP入門 配列(array) 基本編 ref: http://qiita.com/items/b63fb1797aa1be0b3cd0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$array = array(1, 2, 3, 4, 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print_r($array); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array ( | |
[0] => 1 | |
[1] => 2 | |
[2] => 3 | |
[3] => 4 | |
[4] => 5 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$array[インデックス番号] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$array = array('first' => 1, 2, 3, 4, 'final' => 5); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array ( | |
[first] => 1 | |
[0] => 2 | |
[1] => 3 | |
[2] => 4 | |
[final] => 5 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$array[キー] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment