0
マイ配列:フィルタアレイ結果
<?php
$hoppa = array
(
"0" => array
("0","0","0","0","0","0","0","0","0","0"),
"1" => array
("0","0","0","0","0","0","0","0","0","0"),
"2" => array
("1","0","0","1","0","0","0","0","0","0"),
"3" => array
("1","0","0","1","0","1","1","1","1","0"),
"4" => array
("1","1","1","1","0","0","0","0","1","0"),
"5" => array
("1","0","0","1","0","1","1","1","1","0"),
"6" => array
("1","0","0","1","0","1","0","0","1","0"),
"7" => array
("1","0","0","1","0","1","1","1","1","0"),
"8" => array
("0","0","0","0","0","0","0","0","0","0"),
"9" => array
("0","0","0","0","0","0","0","0","0","0")
);
?>
マイアレイの出力:
Array
(
[0] => Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 0
[9] => 0
)
[1] => Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 0
[9] => 0
)
[2] => Array
(
[0] => 1
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 0
[9] => 0
)
[3] => Array
(
[0] => 1
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 1
[6] => 1
[7] => 1
[8] => 1
[9] => 0
)
[4] => Array
(
[0] => 1
[1] => 1
[2] => 1
[3] => 1
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 1
[9] => 0
)
[5] => Array
(
[0] => 1
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 1
[6] => 1
[7] => 1
[8] => 1
[9] => 0
)
[6] => Array
(
[0] => 1
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 1
[6] => 0
[7] => 0
[8] => 1
[9] => 0
)
[7] => Array
(
[0] => 1
[1] => 0
[2] => 0
[3] => 1
[4] => 0
[5] => 1
[6] => 1
[7] => 1
[8] => 1
[9] => 0
)
[8] => Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 0
[9] => 0
)
[9] => Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 0
[8] => 0
[9] => 0
)
)
それは1(1)を与える結果
echo $hoppa[1][1];
として0(ゼロ)を与えます結果として
echo $hoppa[2][0];
結果に0(ゼロ)の値を表示したくありません。私は結果としてPHPスクリプトを1に戻したい。どの機能を使うべきですか?または私にサンプルを与えることができますか?
:
これがその結果。私は正しいですか? –
@Babak Naffas、はい。それは私が欲しいものです。私はprint_r($ hoppa)を使いたい。 1つの値しか得られません。 – Taffarel
ドキュメントによると、あなたは間違った機能を見ている。 http://php.net/manual/en/function.print-r.php –