©
This document uses PHP Chinese website manual Release
(PHP 4, PHP 5, PHP 7)
pos — current() 的别名
此函数是该函数的别名: current() 。
[#1] vinicius at codemakers dot com dot br [2014-05-06 15:04:42]
<?php
$countries = array("Brazil", "England", "Japan", "France");
// Get the current position
echo pos($countries); // print Brazil
// Go to next position
echo next($countries); // print England
// Current position
echo pos($countries); // print England
// Previous position
echo prev($countries); // print Brazil
// End Position
echo end($countries); // print France
// Current position
echo pos($countries); // print France
[#2] ranit8085 at gmail dot com [2013-06-29 10:03:00]
<?php
$letter = array('a', 'b', 'c', 'd','e','f');
$cur_letter = current($letter);
$arr = array();
var_dump(current($arr));
?>