//自訂印出陣列所有內容的函數 function show(#array)
";
function show($a){
echo "本陣列所有內容:";
while(list($key,$v) = each($a)){
echo $v.",";
}
echo "
";
}
$stu = array(1=>"李大同","張花花","林美美","宋妮妮","吳盼盼");
show($stu);
$b = array("Did you lose weight intentionally?妳有故意在減肥嗎?",
"I've got missed calls. 我有未接來電耶~",
"I wonder which shoes to put on. 該穿那雙鞋呢?",
"I don't have a good appetite these days. 最近都沒什麼胃口",
"Don't even think about it~ 想都別想啦!!");
show($b);
$fruit = array(1=>"Orange","Banana","Grape","Apple","Flower");
show($fruit);
?>