愚者樹屋

|
Home About Contact
|

series

3d軟體 (1) apache (1) css (4) godot (8) 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) 遊戲推薦 (4) 雜記 (1)

Tags

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

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) godot (8) 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) 遊戲推薦 (4) 雜記 (1)

Tags

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

Recent Posts

用jmeter進行壓力測試2 下載其他資源

2023/05/06

使用yt-dlp下載需登入的嵌入式vimeo影片

2024/06/22

jquery 插入html

2023/06/04

用jmeter進行壓力測試

2023/04/29

css垂直對齊設定

2023/05/27

mastodon misskey pixiv plurk twitter 巴哈姆特

© 2022-2025 愚者樹屋