ID:               45138
 Updated by:       [EMAIL PROTECTED]
 Reported By:      bahadir at eggdrop dot gen dot tr
-Status:           Open
+Status:           Bogus
 Bug Type:         Filesystem function related
 Operating System: Windows XP
 PHP Version:      5.2.6
 New Comment:

See the output: var_dump($inthere); 

The ignore the newlines use the second parameter (flags) with
FILE_IGNORE_NEW_LINES.


Previous Comments:
------------------------------------------------------------------------

[2008-05-30 13:47:31] bahadir at eggdrop dot gen dot tr

Description:
------------
in_array or file function doesn't work.

Reproduce code:
---------------
My test.php File:
<?php

$findme = 'bahadir';
$inthere = file('names.txt');

if (in_array($findme, $inthere)) {
        echo 'yes! :)';
} else {
        echo 'no :(';
}

?>

My names.txt File:
bahadir
baris
alper
halil

Expected result:
----------------
Result:
no :(

Why?



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45138&edit=1

Reply via email to