Hi all,
I have opened a file like..
$f = fopen("mynewfile.txt", 'r'); $stock=file("mynewfile.txt");
(1)how could I know the last element of the "$stock[]"..
(2)How can I find that this is(last element) the "\n" (new line)
Thanx
Hi,
0 - You don't have to use fopen in order to use file() 1 - $last = end($stock); 2 - if ( $last == "\n" )
Home this helps