how can i make this short
#1

how can i make this short??
Код HTML:
	if (reason == 456 || reason==2 || reason==4 || reason==13 || reason==22 || reason==56 || reason==654
	|| reason==456|| reason==7657|| reason==456|| reason==9|| reason==9|| reason==456|| reason==683|| reason==456|| reason==456
	|| reason==9|| reason==3435|| reason==667|| reason==9|| reason==54645|| reason==356|| reason==454|| reason==54|| reason==35
	|| reason==34|| reason==345|| reason==34|| reason==345|| reason==6456|| reason==3546|| reason==45|| reason==356|| reason==956
	|| reason==78|| reason==34|| reason==96|| reason==967|| reason==456|| reason==356|| reason==46|| reason==356|| reason==356)
	{
Reply
#2

switch(reason){
case 456:
{
}
case 3435:
{
}

}
Reply
#3

PHP код:
stock IsValidReason(reason){
/* Reasons check, if or switch statement*/ {
return 
1;
}
return 
0;

Now you dont need to write down that everytime.
Reply
#4

PHP код:
bool:InArray(value,arr[],size=sizeof(arr)){
    for(new 
isizei++)if(value==arr[i])return true;
    return 
false;
}
if(
InArray(reason,{456,2,4,13})) 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)