barons Posted March 15, 2005 Report Share Posted March 15, 2005 ir divi skripti: 1) $f = file('java/action/action.txt'); for ($i=0;$i<=1;$i++) { $rindas= $f[$i]; print("<br>$rindas"); } iznaakums1: 1:Nosukums1:Apraksts1 2:Nosaukums2:Apraksts2 2)$content = file('java/action/action.txt') ; while ($val = each($content)) { $tmp = explode(":",$val[1]); print("<br>$tmp[1]<br>"); } iznaakums2: Nosukums1 Nosaukums2 Nosukums3 Nosaukums4 Kā abus apvienot vai uzrakstiitu, lai sanaaktu shaadi: Nosukums1 Nosaukums2 :unsure: Link to comment Share on other sites More sharing options...
Kavacky Posted March 15, 2005 Report Share Posted March 15, 2005 iznaakums2: Nosukums1 Nosaukums2 Nosukums3 Nosaukums4 Kā abus apvienot vai uzrakstiitu, lai sanaaktu shaadi: Nosukums1 Nosaukums2 Un ar ko šie divi atšķiras? Link to comment Share on other sites More sharing options...
barons Posted March 15, 2005 Author Report Share Posted March 15, 2005 Un ar ko šie divi atšķiras? 15015[/snapback] Tskkjiras ar to ka pirmaa gadiijumaa raada visus ierakstus bet man vajag lai sadal piem. pa diviem! Link to comment Share on other sites More sharing options...
bubu Posted March 15, 2005 Report Share Posted March 15, 2005 Ak dies, skaitīt līdz divi nemāki? 2)$content = file('java/action/action.txt'); $count = 0; while (($val = each($content)) && ($count<2)) { $tmp = explode(":",$val[1]); print("<br>$tmp[1]<br>"); $count++; } Link to comment Share on other sites More sharing options...
barons Posted March 15, 2005 Author Report Share Posted March 15, 2005 Ak dies, skaitīt līdz divi nemāki? 2)$content = file('java/action/action.txt'); $count = 0; while (($val = each($content)) && ($count<2)) { $tmp = explode(":",$val[1]); print("<br>$tmp[1]<br>"); $count++; } 15017[/snapback] Paldiesinj! Tagad tikai jaaizdomaa kaa paraadiit naakamaas divas rindinjas bez pirmaam <_< Link to comment Share on other sites More sharing options...
bubu Posted March 15, 2005 Report Share Posted March 15, 2005 (edited) Nu jopcig! Cilvēki for ciklus nemāk lietot! :) $no = 1; // skaita no 0 $skaits = 2; $content = file('java/action/action.txt'); for ($i=$no; $i<$no+$skaits; $i++) { $tmp = explode(":",$content[$i]); print("<br>$tmp[1]<br>"); } Edited March 15, 2005 by bubu Link to comment Share on other sites More sharing options...
barons Posted March 15, 2005 Author Report Share Posted March 15, 2005 Nu jopcig! Cilvēki for ciklus nemāk lietot! :) $no = 1; // skaita no 0 $skaits = 2; $content = file('java/action/action.txt'); for ($i=$no; $i<$no+$skaits; $i++) { $tmp = explode(":",$content[$i]); print("<br>$tmp[1]<br>"); } 15028[/snapback] Nu feini, un es pusi dienas domaaju :D Link to comment Share on other sites More sharing options...
рпр Posted March 15, 2005 Report Share Posted March 15, 2005 Nu feini, un es pusi dienas domaaju :D 15030[/snapback] nākošreiz palasi manuāli, tad pietiks ar 3 stundām.. Link to comment Share on other sites More sharing options...
barons Posted March 15, 2005 Author Report Share Posted March 15, 2005 Nu nekaadi nevaru izdomaat <<prev next>> :( Link to comment Share on other sites More sharing options...
kirils Posted March 15, 2005 Report Share Posted March 15, 2005 Nu nekaadi nevaru izdomaat <<prev next>> :( 15035[/snapback] ko? Link to comment Share on other sites More sharing options...
Kavacky Posted March 15, 2005 Report Share Posted March 15, 2005 ko?Izveidot sadali un parādīt pa gabaliem ;) Link to comment Share on other sites More sharing options...
Recommended Posts