|
 |
|
รบกวนถาม เรื่อง ตัวแปรหน่อยครับ คือ ผมต้องการเพิ่มค่า i ไปเรื่อยๆ ถ้า show ==1 ก้ให้บวกเพิ่ม 1 |
|
 |
|
|
 |
 |
|
Code (PHP)
<?php
$array=array('1','2','3','1','5','6','7','8','9','0','0','6','6','1','1','1','7','1','7','7','7');
$count=0;
foreach($array as $val){
if($val==1)
$count++;
}
echo $count;
?>
ประมาณนี้ป่าว ครับ คุณ scollfield
|
 |
 |
 |
 |
Date :
2009-09-04 23:05:47 |
By :
nilas |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
Load balance : Server 02
|