|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-10-27 01:24 UTC] requinix@php.net
-Status: Open
+Status: Not a bug
[2015-10-27 01:24 UTC] requinix@php.net
[2015-10-27 01:49 UTC] andreas dot baumgaertner at tisco dot at
[2015-10-27 02:44 UTC] requinix@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 19:00:01 2026 UTC |
Description: ------------ array_search - positive match on $haystack[0] evalutes to boolean FALSE the same value at integer array index 1 matches perfectly and evaluates to 1 -- change sample script to $haystack[1] = 'German'; $haystack[2] = 'English'; array_search('german',$haystack_lower) returns 1 now ... Test script: --------------- <?php $haystack = array(); $haystack[0] = 'German'; $haystack[1] = 'English'; $haystack_lower = array_map('strtolower', $haystack); print_r($haystack); print_r('<br>'); print_r($haystack_lower); print_r('<br>'); if (array_search('german',$haystack_lower) != FALSE) { print_r('match'); } ?>