摘要: '; }}//三层完整圣诞树for($i=0;$i<3;$i++){ sds();} 阅读全文
posted @ 2013-12-27 17:16 忆殇之痕 阅读(653) 评论(0) 推荐(0) 编辑
摘要: //将参数转换为变量parse_str("id=23&name=John Adams");echo $id //23 阅读全文
posted @ 2013-12-27 14:48 忆殇之痕 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 30,'b'=>70);//概率方法function gl($arr){ $total=array_sum($arr); $num=rand(1,$total); $jishu=0; foreach($arr as $key=>$o){ $o2=$o+$jishu; $jishu+=$o; if($num <=$o2){ echo $key; return; } }}//获得概率gl($arr); 阅读全文
posted @ 2013-12-27 11:44 忆殇之痕 阅读(115) 评论(0) 推荐(0) 编辑