Page 1 of 1

File Read

Posted: Tue Aug 08, 2006 1:26 am
by sujithfem
hi
I wanna code which is use to display the following only ,Ref doc , Reference ,the datas are in text file like

Run no. Ref. doc. Reference Pers.no.

1000003074 1000498611 1250047681/000 20012163
1000003074 1000498611 1250047681/000 20012163

1000003074 1000498612 1250047780/000 20012260
1000003074 1000498612 1250047780/000 20012260

I need to display Ref doc , Reference from above code by php ,please let me know the solution .....

Posted: Tue Aug 08, 2006 1:30 am
by feyd

Posted: Tue Aug 08, 2006 2:02 am
by sujithfem
I got but i need 2nd and 3rd column of the specified text file please let me know the solution for the same
<?php
$lines = file('test.txt');


foreach ($lines as $line_num => $line) {
echo $line."</br>\n";
}
?>

Test.text

Run no. Ref. doc. Reference Pers.no.

1000003074 1000498611 1250047681/000 20012163
1000003074 1000498611 1250047681/000 20012163

1000003074 1000498612 1250047780/000 20012260
1000003074 1000498612 1250047780/000 20012260

Posted: Tue Aug 08, 2006 8:46 am
by feyd
as I said, possibly explode().