dot Posted March 14, 2005 Report Share Posted March 14, 2005 man ir txt fails dati.txt kaa lai failaa ar php paliidziibu atrod kaadu noteiktu vaardu vai vaardus un smuki izdruka taas rindinjas kuraas tas vai tie vaardi atrodas. paldies jau iepriekss. Link to comment Share on other sites More sharing options...
Kavacky Posted March 14, 2005 Report Share Posted March 14, 2005 $dati = file('dati.txt'); $dati - masīvs, kurā tagad ir visas rindiņas, katra vienā elementā. Ņem pa vienai un pārbaudi, vai atrodams vajadzīgais teksts, ja ir - drukā ārā. Link to comment Share on other sites More sharing options...
Venom Posted March 14, 2005 Report Share Posted March 14, 2005 $lines=file('dati.txt'); $search=strtolower('something'); while($line=array_shift($lines)) if (strpos(strtolower($line),$search)!==false) echo '<br />'.$line; Link to comment Share on other sites More sharing options...
dot Posted March 14, 2005 Author Report Share Posted March 14, 2005 taa arii domaaju, ka nekas garss nebuus, tuuliit paarbaudiishu, paldies :) Link to comment Share on other sites More sharing options...
Kavacky Posted March 14, 2005 Report Share Posted March 14, 2005 taa arii domaaju, ka nekas garss nebuus, tuuliit paarbaudiishu, paldies :)Viss ģeniālais taču ir vienkāršs. :) Link to comment Share on other sites More sharing options...
dot Posted March 14, 2005 Author Report Share Posted March 14, 2005 nevaru nepiekrist :) Link to comment Share on other sites More sharing options...
Recommended Posts