English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
pos() is an alias of the current() function
pos ( $array );
The pos() function is an alias of the current() function, it only returns the value of the array element currently pointed to by the internal pointer. It does not move the pointer in any way. If the internal pointer points to the end of the element list, pos() returns FALSE.
Serial Number | Parameters and Description |
---|---|
1 | array(Required) It specifies an array |
It returns the current element in the array.
<?php $input = array('foot', 'bike', 'car', 'plane'); $mode = pos($input); print "$mode <br />"; ?>Test and see‹/›
Output result:
foot