list函数的用法
- 把数组中的值赋给一些变量.
$my_array = array("Dog","Cat","Horse");
list($a, $b, $c) = $my_array;
echo $a.'<br>'; //输出Dog
echo $b.'<br>'; //输出Cat
echo $c; //输出Horse
$my_array = array("Dog","Cat","Horse");
list($a, $b, $c) = $my_array;
echo $a.'<br>'; //输出Dog
echo $b.'<br>'; //输出Cat
echo $c; //输出Horse