謝晒的PHP網頁設計
聯絡E-mail:
sean0704@gmail.com
站內搜尋
Tuesday, July 4, 2017
[PHP] 簡單的計數方法 (透過 static 建立靜態變數來達成)
直接看範例:
$arr = array('a', 'b', 'c');
foreach ($arr as $v) {
static $int = 0;
$int++;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment