快速创建索引数组
1.range(low, high [, step]):创建包含指定范围的元素的数组
<?php
$arr=range(1,10,2);
print_r($arr);
echo '<hr/>';
?>
2.compact():创建一个包含变量名和它们值的数组
<?php
$firstname = "Peter";
$lastname = "Griffin";
$age = "41";
$result = compact("firstname", "lastname", "age");
print_r($result);
?>