帮我简化一下代码
Jun 07, 2016 am 11:39 AM写的比较大,帮我简化一下 public function url(){ <br>
$xid =I('xid'); <br>
$xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<list>\n"; <br>
if($xid==(44)){ <br>
$xml.='1'."\n"; <br>
}elseif($xid==497){<br>
$xml.='1'."\n";<br>
}elseif($xid==613){<br>
$xml.='1'."\n"; <br>
}elseif($xid==765){<br>
$xml.='1'."\n"; <br>
}else{<br>
$xml.='2'."\n"; <br>
} <br>
$xml .='</list>';<br>
echo $xml ; <br>
}
AD:真正免费,域名+虚机+企业邮箱=0元

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Learn about introductory code examples for Python programming

PHP variables in action: 10 real-life examples of use

From beginner to proficient: Code implementation of commonly used data structures in Go language

How to use PHP to write inventory management function code in the inventory management system

Java implements simple bubble sort code

Go language programming examples: code examples in web development

Huawei Cloud Edge Computing Interconnection Guide: Java code examples to quickly implement interfaces

Guidance and Examples: Learn to implement the selection sort algorithm in Java
