Array addition why did you take out only the first value? Would you please take a look at it?
PHP Code
Array ([1] = 3 [2] = 3 [3] = 4 [4] = 4 [5] = 4 [6] = 3 [7] = 4 [8] =&G T 4 [Ten] = 4 [One] = 4 [[4] = 5 [All] = 1 [+] = 3 [+] = 2 [+] = 18 [] + 3 [+] = 4 [[+] = 1 [] = 2 [] = 4 [+] = 3 [+] = 3 [+] = 2 [3] = [+] = 3 [+] = 4 [+] = 4 [+] = 4 [[] = 4 [+] = 5 [] => ; 4 [[+] = 3 [PNS] = 4 [] = 4 [All] = 4 [+] = 3 [in] = 3 [] [3] + 3 [[+] = 2 [4] [+] [+] [] = 4 [+] = 1 [Wuyi] = 1 [in] + 1 [+] = 3 [[+] = 4 [4] = 4 [[+] = [+] = 4 [] = 3 [] = 3 [+] = 4 [+] => ; 5 [[+] = 4 [+] = 1 [3] + 2 [[+] =]
PHP Code
Public Function Countofconstitutiontype ($arrayOptionsId) {$strFractionType = ""; $resultFraction = ""; if (Isset ($arrayOptionsId) && Is_array ($arrayOptionsId) &&!empty ($arrayOptionsId)) {$pingheFraction = ""; foreach ($arrayOptionsId as $key = + $value) {//echo "key:". $key. " --". $value."
";p Rint_r ($arrayOptionsId); if ($key = = 17 | | $key = = 18 | | $key = = 19 | | $key = = 5 | | $key = = 13 | | $key = = 22 | | $key = =) {$yangxFraction + = $value; echo "111:". $yangxFraction. "
";} if ($key = = | | $key = = | | | $key = = | | $key = = | | $key = = | | $key = = | | $key = = 31) { $yinxFraction + = $value;} if ($key = = 2 | | $key = = Ten | | $key = = | | $key = = | | $key = = | | $key = = | | $key = = 3 | | $key = = 16) { $qixFraction + = $value;} if ($key = = + | | $key = = | | $key = = | | $key = | | $key = = | | $key = = | | $key = = 39) { $tansFraction + = $value;} if ($key = = | | $key = = | | $key = = | | $key = = | | $key = = | | $key = = | | $key = = + = $value;} if ($key = = | | $key = = | | $key = = | | $key = = | | $key = = | + = $value;} if ($key = = | | $key = = | | $key = = | | $key = = | | $key = = | | $key = = | n + = $value;} if ($key = = 4 | | $key = = | | $key = = | | $key = = | | $key = = | | $key = = | | $key = =) {$qiyFraction + = $vaLue;} if ($key = = 1 | | $key = = 2 | | $key = = 3 | | $key = = 4 | | $key = = 5 | | $key = = 6 | | $key = = 7 | | $key = = 8) {if ( ($key = = 2 | | $key = = 3 | | $key = = 4 | | $key = = 5 | | $key = = 7 | | $key = 8) && $value = = 1) {$value = 5; if ($key = = 2 | | $key = = 3 | | $key = = 4 | | $key = = 5 | | $key = = 7 | | $key = = 8) && $value = = 2) { $value = 4; if ($key = = 2 | | $key = = 3 | | $key = = 4 | | $key = = 5 | | $key = = 7 | | $key = = 8) && $value = = 3) { $value = 3; if ($key = = 2 | | $key = = 3 | | $key = = 4 | | $key = = 5 | | $key = = 7 | | $key = = 8) && $value = = 4) { $value = 2; if ($key = = 2 | | $key = = 3 | | $key = = 4 | | $key = = 5 | | $key = = 7 | | $key = = 8) && $value = = 5) { $value = 1; } $pingheFraction + = $value;} $resultFraction = $yangxFraction. " # ". $yinxFraction." # ". $qixFraction." # ". $tansFraction." # ". $wenrFraction." # ". $xuyFraction." # ". $tedFraction." # ". $qiyFractiOn. " # ". $pingheFraction; return $resultFraction;}}}