dot Posted December 21, 2005 Report Share Posted December 21, 2005 ir fails, kuraa glabaajas aptuveni shaada informaacija. viens,viens,divi,triis,chetri divi trii chetri,viens,divi,triis,chetri,pieci,seshi pieci,viens,divi seshi septinji ar count saskaitu cik rindinju ir failaa, bet kaa saskaitiit cik vaardu ir aiz komata, ja vipaar ir. paldies jau ieprieksh. Link to comment Share on other sites More sharing options...
bubu Posted December 21, 2005 Report Share Posted December 21, 2005 Ja vajag visā failā: $faila_saturs = file_get_contents("fails.txt"); $vaardu_skaits = substr_count($faila_saturs, "\n") + substr_count($faila_saturs, ","); (aiz pēdējā vārda obligāti jābūt \n, citādi atgriezīs par 1 mazāk skaitu. Link to comment Share on other sites More sharing options...
dot Posted December 21, 2005 Author Report Share Posted December 21, 2005 ljoti labi, liels paldies :) Link to comment Share on other sites More sharing options...
Recommended Posts