this is my first post. sorry if i did something wrong...
anyways i have a file that gets updates by php and this is EXACTLY it:
31
127
131
124
144
142
133
133
9
0
22
18
i made this script in php:
$logContents = file_get_contents("logs/mainlog.txt");
$logitemArray = explode("
", $logContents);
echo max($logitemArray);
but it echos 9. why? it said in the php documentation that max() should return the biggest value in the array
thanks in advance