1 2 3 4 5 6 7 8 9 10
<?php $ext = "rar,zip,gif,php"; $e = explode(',',$ext); var_dump($e); if(in_array('rar' , $e)){ echo"yes"; }else{ echo"no"; } ?>
1 2 3 4 5 6 7 8 9 10 11
array(4) { [0]=> string(3) "rar" [1]=> string(3) "zip" [2]=> string(3) "gif" [3]=> string(3) "php" } yes