Home  >  Article  >  Backend Development  >  怎么重用php中if条件的代码

怎么重用php中if条件的代码

WBOY
WBOYOriginal
2016-06-13 11:29:59774browse

如何重用php中if条件的代码
我有一个if的条件(是由很多个表达式组合而成),在很多页面都要用到,但这个条件偏偏是随时变化的,比如:
if (条件)
  {语句}

如何能够重用这个条件的代码?非常感谢!

PHP 代码重用
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