php in_array 和 str_replace

有这样的用法哦

 $allow_state_array_invoc = array('store_invoice','invoiceno','invoicerec','invoiceing');
if (in_array($_GET['state'],$allow_state_array_invoc)) { $condition['invoice_state'] = str_replace($allow_state_array_invoc,
array('0','1','2','3'), $_GET['state']); }
else{
$_GET['state'] = 'store_invoice';
$condition['invoice_state'] = 0 ;
}

O(∩_∩)O哈哈哈~很懒

上一篇:ashx一般处理程序文件用处


下一篇:Centos7.6部署k8s v1.16.4高可用集群(主备模式)