Problems with array_search and file()
Posted: Thu Jun 02, 2005 11:57 pm
anyone else have problems using array_search to seek in arrays created by file()?
I have tried creating my own array and I had no problems getting the correct location of the first instance, however when I used a file() array, it fails.
The file in question isn't the problem. To test this I used a file that I successfully loaded just before, and printed the output. file() is reading the file, but array_search does not seem to work with that array. Other arrays seem to work fine.
I have tried creating my own array and I had no problems getting the correct location of the first instance, however when I used a file() array, it fails.
The file in question isn't the problem. To test this I used a file that I successfully loaded just before, and printed the output. file() is reading the file, but array_search does not seem to work with that array. Other arrays seem to work fine.