答案 0 :(得分:1)
答案 1 :(得分:1)
答案 2 :(得分:1)
//试试这个
<?php
//array
$data=array("0" => 0,"1" => 30,"2" => 14);
//print array without apply array_shift function
echo '<pre>';
print_r($data);
echo '</pre>';
if(end($data) != 0){
if($data[0] == 0){
array_shift($data);
}
}
//print array with apply array_shift function
echo '<pre>';
print_r($data);
echo '</pre>';
?>
//output
Array
(
[0] => 0
[1] => 30
[2] => 14
)
Array
(
[0] => 30
[1] => 14
)
答案 3 :(得分:0)
答案 4 :(得分:0)
答案 5 :(得分:0)