Why is this code not working?
I have test.txt it contains:
A
B
C
My PHP code is:
$arr = file('test.txt');
if (in_array('A', $arr)) {
echo 'A is found';
}
Result. nothing. But this following code works fine:
if (in_array('C', $arr)) {
echo 'C is found';
}
Can someone help me?