亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

Php finds the sum of all odd items of the following two-dimensional array
PHP中文網(wǎng)用戶-7954359
PHP中文網(wǎng)用戶-7954359 2023-10-18 15:37:12
0
1
605

$arr2=array(

Array(12,23,34,45),

Array (34,45,67,89),

Array( 56,78,90,1)

)

Is there anyone who knows?



PHP中文網(wǎng)用戶-7954359
PHP中文網(wǎng)用戶-7954359

reply all(1)
Ray

<?php

$arr2?=?array(
????array(12,?23,?34,?45),
????array(34,?45,?67,?89),
????array(56,?78,?90,?1)
);
$sum?=?0;
//?遍歷
foreach?($arr2?as?$subArray)?{
?????//?遍歷
????foreach?($subArray?as?$value)?{
????????//?判斷奇數(shù)項(xiàng)
????????if?($value?%?2?!=?0)?{
????????????$sum?+=?$value;
????????}
????}
}
echo?$sum;
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template