$value){ #echo "Key值:" . $key . "Value值" . $value . "
"; if (substr($key, 0, 4) == "item"){ array_push($item, $value); //取出item號碼放入array中 if (isset($_POST[$value])) { //判斷item是否有被點選 array_push($result,1); //取出result放入array中 echo $value . ":" . $_POST[substr($key, 4)] . "
"; }else{ array_push($result,0); echo $value . ":" . "0" . "
"; } } if (substr($key, 0, 11) == "item_detail"){ array_push($item_detail, urlencode($value)); //取出detail放入array中 } } */ function get_maintenance_item($combono, $data) { $item = array(); foreach ($data as $key => $value){ if ((substr($key, 0, 4) == "item") && (substr($key, 0, 5) != "item_")){ array_push($item, $value); //取出item號碼放入array中 } } return $item; } function get_maintenance_item_detail($combono, $data) { $item_detail = array(); foreach ($data as $key => $value){ if (substr($key, 0, 11) == "item_detail"){ array_push($item_detail, urlencode($value)); //取出detail放入array中 } } return $item_detail; } function get_maintenance_result($combono, $data) { $result = array(); foreach ($data as $key => $value){ if ((substr($key, 0, 4) == "item") && (substr($key, 0, 5) != "item_")){ if (isset($_REQUEST[$value])) { //判斷item是否有被點選 array_push($result,1); //取出result放入array中 #echo $value . ":" . $_POST[substr($key, 4)] . "
"; }else{ array_push($result,0); #echo $value . ":" . "0" . "
"; } } } return $result; } ?>