Home  >  Article  >  Backend Development  >  Usage of in_array function_PHP tutorial

Usage of in_array function_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 16:58:41997browse

Usage of in_array function The in_array function determines whether there is an M character in the array. Let me give an example below:

$ext = array('avi','wmv','asf','mov','rm','ra','ram','mp3','wma','swf');

if(in_array('mp3',$ext) ){

echo 'exist';

}else{

echo 'does not exist';

}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631376.htmlTechArticleUsage of in_array function The in_array function determines whether there is an M character in the array. Let me give an example below: ?php $ ext=array('avi','wmv','asf','mov','rm','ra','ram','mp3','wma','swf'); if...
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