Speed Posted October 23, 2006 Report Share Posted October 23, 2006 <?php $maps = file("C:/HLServer/cstrike/mapcycle.txt", "a"); echo "$map[1],$map[2],$map[3]..." ?> man vaig lai man parada visu kas ir rakstits mapcykle.txt kaa uztaisit lai man nebutu jaraksta entos mainigos ??? Link to comment Share on other sites More sharing options...
andrisp Posted October 23, 2006 Report Share Posted October 23, 2006 foreach ($maps as $v) { echo $v; } http://lv.php.net/foreach Link to comment Share on other sites More sharing options...
blackhalt Posted October 24, 2006 Report Share Posted October 24, 2006 <?php $maps=file_get_contents('C:/HLServer/cstrike/mapcycle.txt'); echo $maps; ?> Link to comment Share on other sites More sharing options...
ntw Posted October 26, 2006 Report Share Posted October 26, 2006 Man šito izlasot radās jautājums, vai blackhalt gadījumā echo $maps neparādīs visu txt failu rindiņā, un kā izdarīt, lai neparādītu rindiņā, net gan katru vārdu nākamajā rindiņā...? Link to comment Share on other sites More sharing options...
bubu Posted October 26, 2006 Report Share Posted October 26, 2006 $words = explore(" ", file_get_contents('C:/HLServer/cstrike/mapcycle.txt')); echo "<pre>", implode("\n", $words), "</pre>"; Link to comment Share on other sites More sharing options...
andrisp Posted October 27, 2006 Report Share Posted October 27, 2006 (edited) Vai arī: echo implode("<br />\n", $words); Edited October 27, 2006 by andrisp Link to comment Share on other sites More sharing options...
Recommended Posts