有这样的用法哦
$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哈哈哈~很懒