Home  >  Article  >  Backend Development  >  谁帮我封装下

谁帮我封装下

WBOY
WBOYOriginal
2016-06-23 14:39:11910browse

switch($_MODULE[paibaobei]){	case "2":	$paikd=360;	$zuobianjus=array(0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8,0,8);	break;	case "3":	$paikd=234;	$zuobianjus=array(0,8,8,0,8,8,0,8,8,0,8,8,0,8,8,0,8,8,0,8,8,0,8,8,0,8,8,0,8,8,0,8,8,0,8,8,0,8,8,0,8,8);	break;	case "4":	$paikd=170;	$zuobianjus=array(0,8,8,8,0,8,8,8,0,8,8,8,0,8,8,8,0,8,8,8,0,8,8,8,0,8,8,8,0,8,8,8,0,8,8,8,0,8,8,8,0,8,8,8);	break;	}
 

写在函数里 参数就是int类型 输入参数8 就输出上面代码  当然输出7 就变成7啦。。


回复讨论(解决方案)

都知道思路了,自己封装就是了。

这种对应的东西有封装的必要嘛?include?

都知道思路了,自己封装就是了。
看到你的牌子 我想起了 万年老二这个词


都知道思路了,自己封装就是了。
看到你的牌子 我想起了 万年老二这个词

放开那个老2 让我来

这种对应的东西有封装的必要嘛?include?  帮我封装下么 我算法不好。。

看不明白你需要的是什么

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn