愚者樹屋

|
Home About Contact
|

series

3d軟體 (1) apache (1) css (4) eagle (1) godot (9) google-api (1) google翻譯 (1) html (6) hugo安裝 (7) javasciprt (1) javascript (14) jquery (3) mysql (9) notepad++ (1) php (33) python (1) unity (1) yt-dlp (1) 像素畫 (1) 免費軟體 (8) 壓力測試 (2) 弱點掃描修補 (1) 無障礙網站 (1) 社群網站 (1) 遊戲推薦 (5) 雜記 (1)

Tags

2d軟體 3d軟體 ai ai代理 apache css eagle godot google-api google翻譯 html hugo javasciprt javascript jquery mysql notepad++ php python tcpdf

php取得array key

post date - 2023/05/13
last update - 2023/05/13

紀錄一下php取得陣列key值的方法

參考資料:https://stackoverflow.com/questions/8729410/php-get-key-name-of-array-value

array_search

可以使用array_search來取得陣列值key

$arr = array ('a','b','c','a');
$key = array_search ('a', $arr);
//取得0

在有相同值的情況下,會取得第一個符合的key,上面那段來說就是0。
如果都沒有符合的值則會回傳false。

Tags : php

series

3d軟體 (1) apache (1) css (4) eagle (1) godot (9) google-api (1) google翻譯 (1) html (6) hugo安裝 (7) javasciprt (1) javascript (14) jquery (3) mysql (9) notepad++ (1) php (33) python (1) unity (1) yt-dlp (1) 像素畫 (1) 免費軟體 (8) 壓力測試 (2) 弱點掃描修補 (1) 無障礙網站 (1) 社群網站 (1) 遊戲推薦 (5) 雜記 (1)

Tags

2d軟體 3d軟體 ai ai代理 apache css eagle godot google-api google翻譯 html hugo javasciprt javascript jquery mysql notepad++ php python tcpdf

Recent Posts

php取得使用者ip

2022/09/17

Holo倖存者(Holocure)

2023/08/26

godot使用ai代理製作筆記

2026/09/25

hugo外掛

2022/04/24

godot動畫播放

2023/04/08

mastodon misskey pixiv plurk twitter 巴哈姆特

© 2022-2026 愚者樹屋