<.?
/* 建立一个数组*/
$fruitArray = array("apple", "orange", "banana", "kiwi", "pear").
/* 向数组中添加元素*/
array_unshift($fruitArray, "grape", "pineapple", "tomato").
/* 显示每个元素及其序号*/
while (list($key,$value) = each($fruitArray)) {
echo "$key : $value<.br>.".
}
?>. |