时间:2021-07-01 10:21:17 帮助过:4人阅读
代码如下:
$tmparray = array("1", "2", "3", "4");
$tmparray = array_shift ($tmparray);
print_r($tmparray);
?>
代码如下:
$tmparray = array('a', 'b', 'c', 'd', 'e');
print_r(array_chunk($tmparray, 2));
?>
代码如下:
$tmparray = array ("a", "b");
array_push ($tmparray, "c", "d");
print_r($tmparray);//Array([0] => a[1] =>b[2] =>c[3] =>d)
?>
代码如下:
$tmparray= array ("a", "b");
$resarray = array_unshift ($tmparray, "c", "d");
print_r($resarray )//Array([0] => a[1] =>b[2] =>c[3] =>d)
?>
代码如下:
$tmparray = ("a" => "a","b" => "b","c" => "c","d" => "b");
$resarray = array_unique($tmparray);//("a" => "a","b" => "b","c" => "c");
?>
以上就介绍了国际贸易实务案例分析 PHP中常用数组处理方法实例分析,包括了国际贸易实务案例分析方面的内容,希望对PHP教程有兴趣的朋友有所帮助。