英 [?k?r?nt] 美 [?k?:r?nt]
adj.現(xiàn)在的;最近的;流行的;流傳的
n.電流;趨勢;水流;涌流
復(fù)數(shù): currents
php current()函數(shù) 語法
作用:返回數(shù)組中的當(dāng)前元素的值。
語法:current(array)
參數(shù):
參數(shù) | 描述 |
array | 必需。規(guī)定要使用的數(shù)組。 |
說明:返回數(shù)組中的當(dāng)前元素的值。每個數(shù)組中都有一個內(nèi)部的指針指向它的"當(dāng)前"元素,初始指向插入到數(shù)組中的第一個元素。
php current()函數(shù) 示例
<?php $people = array("西門", "滅絕", "無忌"); echo current($people); ?>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例
輸出:
西門
<?php $arr = array("peter", "滅絕", "歐陽克"); echo current($arr); ?>
運(yùn)行實(shí)例 ?
點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例
輸出:
peter
熱門推薦
- Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 1x.x
- HTML如何設(shè)置當(dāng)前元素樣式?current偽類的作用是什么?
- XPath的current()函數(shù)代表什么上下文?
- 【微信小程序】routeDone with a webviewId 19 that is not the current page(env: Windows,mp,1
- HTML中如何正確使用aria-current?
- 使用Go語言實(shí)現(xiàn)Call-with-current-continuation(call-cc)的可能性