rudzis Posted March 29, 2004 Report Share Posted March 29, 2004 Vajag lai paraadiitu, cik rindu txt failaa ir kopaa. Dariiju taa, ka txt atver kaa array un saskaita rindas t.i. array elementus un izmet saitu ar echo, bet izmet rindinju skaitu dokjii, nevis to kas ir starp \n newline simboliem. Varbuut taapeec, kas viss gabals ir tabulas utml. ? :unsure: Link to comment Share on other sites More sharing options...
Kaklz Posted March 29, 2004 Report Share Posted March 29, 2004 Vajag lai paraadiitu, cik rindu txt failaa ir kopaa. Dariiju taa, ka txt atver kaa array un saskaita rindas t.i. array elementus un izmet saitu ar echo, bet izmet rindinju skaitu dokjii, nevis to kas ir starp \n newline simboliem. Varbuut taapeec, kas viss gabals ir tabulas utml. ? :unsure: <?php $filedata = file_get_contents('fails.txt'); $filedata = trim($filedata); $filearray = explode("\n", $filedata); echo count($filearray); ?> uzsvars uz rindiņu $filedata = trim($filedata); Link to comment Share on other sites More sharing options...
rudzis Posted March 31, 2004 Author Report Share Posted March 31, 2004 Paldies :P Link to comment Share on other sites More sharing options...
Recommended Posts