日期:2014-05-16 浏览次数:20566 次
//数据库连接
$rs = mysql_query("select id,degree,min,max,prize,v from magic_config");
while($r = mysql_fetch_assoc($rs)) {
$prize_arr[] = $r; }
$prize_arr = array(
array('id'=>'1','degree'=>97,'min'=>'1','max'=>'5','prize'=>'不要放弃','v'=>'1'),
array('id'=>'2','degree'=>98,'min'=>'7','max'=>'35','prize'=>'不要灰心','v'=>'1'),);
$prize_arr = array(
array('id'=>'1','degree'=>97,'min'=>'1','max'=>'5','prize'=>'不要放弃','v'=>'1'),
array('id'=>'2','degree'=>98,'min'=>'7','max'=>'35','prize'=>'不要灰心','v'=>'1'),);
foreach ($prize_arr as $key => $value) {
$prize_arr[$key]['degree'] = (int) $value['degree'];
}
var_dump($prize_arr);