loyd Posted August 28, 2008 Report Posted August 28, 2008 Tatad man ir mazinsh saraksts ar vaardiem txt faila. Katrs sava rinda. Ka ar php es varu panemt vienu vardu, ar vinu izdariit darbiibas un talak panemt nakosho vardu utt.?
cucumber Posted August 28, 2008 Report Posted August 28, 2008 ja teksta faila rindas atdalitas ar enter, tad f-ju file nolasi un ar ciklu (piem. foreach ) izej cauri un veic savas darbibas.
blackhalt Posted August 28, 2008 Report Posted August 28, 2008 <?php $lines = file('vaardi.txt'); foreach ($lines as $line) { $kautkas = rtrim($line); echo "$kautkas<br />"; } ?>
Recommended Posts