|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-23 21:48 UTC] pollita@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 18:00:01 2025 UTC |
Description: ------------ The array_search function works fine when searching through regular arrays, but when you try to search with it from an array made with file(), it doesn't find anything. Reproduce code: --------------- example.list: 1 2 3 4 5 bug.php: <? $list = file('example.list'); print array_search('2', $list); ?> Expected result: ---------------- 1 Actual result: -------------- <nothing>