鏃ュ織鏍囩锛歱hp

PHP涓璱n_array濂囨殑闂

鍒嗙被锛PHP璇勮锛0鏉浣滆咃細awinds鏃ユ湡锛2012-05-02闃呰锛16,933 views

    鍦╥n_array涓湁涓変釜鍙傛暟锛屼竴鑸敤閮芥槸鍙敤涓や釜鍙傛暟锛屽涓嬩互浠g爜锛 $arr = array('0E372033','0E372034','0E372035','0E372036','0E372037','0E372038','0E372039'); if(in_array('0E372031',$arr)){ echo "true"; } else{ echo "false"; }     鎸夋甯告潵璇达紝杩欎釜鑲畾涓嶅湪鏁扮粍涓紝杈撳嚭搴旇鏄痜alse锛屼絾鏄繖娈典唬鐮佽緭鍑哄嵈鏄痶rue銆 鎴戝張鎶婁唬鐮佹敼鎴愬涓嬶細 $arr = array('0F372033','0F372034','0F372035','0F372036','0F372037','0F372038','0F372039'); if(in_array('0F372031',$arr)){ echo "true"; } else{ echo "false"; }     杩欎釜鏃跺欒繍琛岃緭鍑虹粨鏋滃嵈鏄痜alse銆傜櫨鎬濅笉寰楀叾瑙o紝鍒板璇锋暀鍜岃闂紝缁堜簬鎵惧埌浜嗙瓟妗堬紝鍘熸潵0E372031杩欐牱鐨勫瓧绗︿覆鍦╬hp鐨勫急绫诲瀷涓細褰撶潃鏄瀛﹁鏁版硶锛屾墍浠ュ氨鏄0锛岃繖涓椂鍊欏垽鏂璱n_array锛屽拰0E372033杩欐牱鐨勫煎氨鐩哥瓑浜嗭紝瑙e喅鏂规硶灏辨槸濡備互涓嬩唬鐮侊細 $arr = array('0E372033','0E372034','0E372035','0E372036','0E372037','0E372038','0E372039'); if(in_array('0E372031',$arr,true)){ ec鈥