$data){ $contents[$data] += $yggs[$id][$data]; } } // データアサイン $assign["name"] = implode(" + ", $name); foreach($ygg_list as $param=>$data){ $assign[$data] = $contents[$data]; } $assign["infight"] = round( ($contents["body"] + $contents["power"]) / 2, 0); $assign["armor"] = round( ($contents["body"] + $contents["guard"]) / 2, 0); $assign["gunfight"] = round( ($contents["speed"] + $contents["sense"]) / 2, 0); } if( is_array($assign) ){ $tmpl->assign($assign); } $tmpl->display($page); $db->destroy(); exit; ?>