主页
PHP
PHP array_slice() 函数
tryphp_func_array_slice4
运行 ❯
×
更改方向
保存代码
更改主题
<?php // Preserve parameter set to true: $a=array("red","green","blue","yellow","brown"); print_r(array_slice($a,1,2,true)); // Preserve parameter set to false (default): $a=array("red","green","blue","yellow","brown"); print_r(array_slice($a,1,2,false)); // Note the differences in the array keys ?>