justus Posted March 23, 2004 Report Share Posted March 23, 2004 skripts kas ielasa datus no faila un no katras rindinjas izveido masiivu, un sadala rindu masiiva elementos, paarbaudiiju errorus neizmet. <?php <? $f=fopen("fails.txt","r"); while($r=fgets($f,499900)){ $dati[$i]=explode(";",trim($r)); unset($dati[$i][sizeof($dati[$i])]); } fclose($f); bet laukaa taas veertiibas es nekaadiigi nevaru izvadiit meegnaaju visaaadi: $saturs=$dati [0][1]; echo ("$saturs"); nekaadiigi nesanaak. :( :( :( :( :( :( :( :( :( :( :( Link to comment Share on other sites More sharing options...
Aleksejs Posted March 23, 2004 Report Share Posted March 23, 2004 (edited) Es kaut kā nevaru iebraukt rindiņas: unset($dati[$i][sizeof($dati[$i])]); funkcionālajā jēgā... Kas tur tiek darīts (cerēts, ka notiek ;) ) Pieļauju arī, ka $i kaut kur tiek piešķirta vērtība. Edited March 23, 2004 by Aleksejs Link to comment Share on other sites More sharing options...
justus Posted March 23, 2004 Author Report Share Posted March 23, 2004 <?php $fails = file('fails.txt'); for ($i=0;$i<=count($fails);$i++) { $masivs[$i] = explode (";",$fails[$i]); } ?> arii ar shito man nesanaak esmu izmisumaa Link to comment Share on other sites More sharing options...
rnc Posted March 23, 2004 Report Share Posted March 23, 2004 <?php $fails = file('fails.txt'); for ($i=0;$i<=count($fails);$i++) { $buu = explode(";",$fails[$i]); echo "<h2>$buu[0]</h2><br>\n"; echo "<h3>$buu[1]</h3><br>\n"; echo "<h5>$buu[2]</h5></br>\n"; echo "-----------------------<br>\n"; } ?> Link to comment Share on other sites More sharing options...
justus Posted March 23, 2004 Author Report Share Posted March 23, 2004 man pasham kauns par sevi Link to comment Share on other sites More sharing options...
Recommended Posts