代码如下 | 复制代码 |
$arr_1=array( "index/logo.png", "www.111cn.net/play.png", "movie/stop.png", "game/war_p.png", "game/starcaft_p.png", "music/fly.png" ); |
$arr_2='index/logo.png';
//怎样将$arr_2在$arr_1出现过的图片复制到"images/"目录下?
//有没有判断某数组当中是否含有某子元素的函数?
代码如下 | 复制代码 |
if( in_array("hello", array("good","bad","hello"))) { echo 'ture'; } else { echo 'false'; } |
//结果 true,找不到返回false