Welcome!
登入
註冊
美寶首頁
美寶百科
美寶論壇
美寶落格
美寶地圖
首頁
>
學涯 / Cultivation Career
>
學門 Academy
>
科學
>
科技
>
資訊
>
程式設計
>
PHP
Advanced
PHP
作者:
主旨:
Tags:
Message:
mepoadm Wrote: ------------------------------------------------------- > For a case-insensitive in_array(), you can use > array_map() to avoid a foreach statement, e.g.: > > <?php > function in_arrayi($needle, $haystack) { > return in_array(strtolower($needle), > array_map('strtolower', $haystack)); > } > ?> > > > Reference and source: > 1. User Contributed Notes in PHP Manuel (2009.02) > 2. Q&A Discussion in Stack Overflow (2010.10)