发布于 2023-11-30 02:47:50 浏览 189 次
<?php
$myArray = array("apple", "banana", "cherry");
$firstValue = reset($myArray);
echo $firstValue; // 输出 "apple"
?>
<?php
$myArray = array("apple", "banana", "cherry");
$firstValue = $myArray[0];
echo $firstValue; // 输出 "apple"
?>