- <?php
- $arr=array(
- 1,2,3,4,5,6
- );
- function filter($var){
- if($var%2==0)
- return true;
- }
- $data=array_filter($arr,"filter");
- $data=array(2,4,6);
- ?>
- <?php
- $arr1=array(‘linux‘,‘Php‘,‘JAVA‘);
- array_map(‘strtoupper‘,$arr1);
- ?>
原文地址:https://www.cnblogs.com/php-linux/p/10625330.html
时间: 2024-10-15 06:43:22