<?php
$ResultText[1][0] = '10';
$ResultText[1][1] = '11';
$ResultText[1][2] = '12';
$ResultText[1][3] = '13';
$ResultText[1][4] = '14';
$ResultText[1][5] = '15';
$ResultText[2][0] = '20';
$ResultText[2][1] = '21';
$ResultText[2][2] = '22';
$ResultText[2][3] = '23';
$ResultText[2][4] = '24';
$ResultText[2][5] = '25';
$ResultText[3][0] = '30';
$ResultText[3][1] = '31';
$ResultText[3][2] = '32';
$ResultText[3][3] = '33';
$ResultText[3][4] = '34';
$ResultText[3][5] = '35';
reset ( $ResultText );
while (list($Type, $Value) = each ($ResultText))
{
reset( $Value );
for ( $i = 0; $i < count( $Value ); $i++ )
{
echo count($Value).' ';
echo "Type : $Type; Value: $Value[$i] <br>";
}
}
echo "34 : ".$ResultText[3][4]."<br>";
$tmp_count = count($ResultText[1]);
echo "배열갯수 tmp_count : $tmp_count <br>";
$tmp_count2 = count($ResultText);
echo "배열갯수 tmp_count2 : $tmp_count2 <br>";
?>
========================================== 결과 ==========================================
6 Type : 1; Value: 10
6 Type : 1; Value: 11
6 Type : 1; Value: 12
6 Type : 1; Value: 13
6 Type : 1; Value: 14
6 Type : 1; Value: 15
6 Type : 2; Value: 20
6 Type : 2; Value: 21
6 Type : 2; Value: 22
6 Type : 2; Value: 23
6 Type : 2; Value: 24
6 Type : 2; Value: 25
6 Type : 3; Value: 30
6 Type : 3; Value: 31
6 Type : 3; Value: 32
6 Type : 3; Value: 33
6 Type : 3; Value: 34
6 Type : 3; Value: 35
34 : 34
배열갯수 tmp_count : 6
배열갯수 tmp_count2 : 3 |
|
|
|
|
|