UK[ˈkʌrənt] US[ˈkɜ:rənt]
adj. Current; recent; popular; circulating
n. Current; trend; current; surge
Plural: currents
php current() function syntax
Function: Return the value of the current element in the array.
Syntax: current(array)
Parameters:
Parameter | Description |
array | Required. Specifies the array to use. |
#Description: Returns the value of the current element in the array. Each array has an internal pointer pointing to its "current" element, initially pointing to the first element inserted into the array.
php current() function example
<?php $people = array("西门", "灭绝", "无忌"); echo current($people); ?>
Run instance»
Click the "Run instance" button to view the online instance
Output:
西门
<?php $arr = array("peter", "灭绝", "欧阳克"); echo current($arr); ?>
Run Instance»
Click the "Run Instance" button to view the online instance
Output:
peter