Ernijs_E Posted October 14, 2008 Report Share Posted October 14, 2008 Vai kāds nevar uzrakstīt pamācību latviski kā lietot switch, vai ko tas dod utt.?! Link to comment Share on other sites More sharing options...
bubu Posted October 14, 2008 Report Share Posted October 14, 2008 Ieteiktu paņemt angļu valodas vārdnīcu rokā un izlasīt šeit: http://php.net/switch Iemācīsies gan valodu, gan switchu. Link to comment Share on other sites More sharing options...
andrisp Posted October 14, 2008 Report Share Posted October 14, 2008 Kā jau bubu teica, iesaku paņemt vārdnīcu un lasīt php.net manuāli, bet ja galīgi nevari, tad: http://webtech.lv/rakstu-darbi/php-reference/ http://webtech.lv/rakstu-darbi/php-reference/#1.9.2 Link to comment Share on other sites More sharing options...
Java Posted October 14, 2008 Report Share Posted October 14, 2008 Switch - pirmkārt tas nozīmē slēdzi - ar to var ieslēgt gaismu un izslēgt! :) Bet Čaks Noriss neieslēdz gaismu - viņš izslēdz tumsu! :) Link to comment Share on other sites More sharing options...
Mikijs Posted October 15, 2008 Report Share Posted October 15, 2008 (edited) #$mainigais = 1; #$mainigais = 2; $mainigs = 3; switch($mainigais){ case 1: echo "Tavs mainigais ir 1!"; break; case 2: echo "Tavs mainigais ir 2!"; braek; case 3: echo "Tavs mainigais ir 3!"; break; /* nezinu vai visi izmanto, bet parauga ja jauieliek */ default: echo "Nezinu kads tev mainigais.. :("; break; } Edited October 15, 2008 by Mikijs Link to comment Share on other sites More sharing options...
Ernijs_E Posted October 15, 2008 Author Report Share Posted October 15, 2008 Lūdzu nevajag taisīt bezjēdzīgas QUOTEs Paldies, bet es izmantoju variantu kad es includoju failu switch.php un tur ir visi šitie sūdi :D :D Link to comment Share on other sites More sharing options...
Java Posted October 15, 2008 Report Share Posted October 15, 2008 Nākamreiz inklūdo failu echo.php, kur notiek komanda echo ''; un arī uz ifiem ir jāinklūdo faili if1.php, if2.php utt. Link to comment Share on other sites More sharing options...
blackhalt Posted October 15, 2008 Report Share Posted October 15, 2008 Nākamreiz inklūdo failu echo.php, kur notiek komanda echo ''; un arī uz ifiem ir jāinklūdo faili if1.php, if2.php utt. include.php ari nevajag aizmirst ;) Link to comment Share on other sites More sharing options...
Recommended Posts