Sliipeetais Posted October 19, 2003 Report Share Posted October 19, 2003 Situaacija - tiek sanjemti bezgaliigi daudz mainiigie (m1, m2, m3, m4 u.t.t.), katrs mainiigais satur kaadu skaitli, piem. m1=12, m2=1 u.t.t. Uzdevums - pa vienam nolasiit mainiigos no m1 liidz m10 un noprinteet tos. Nepaarakstot kodaa print $m1; print $m2; u.t.t. Taa teikt vajadziigs kaut kaads cikls, kursh pats veido shos mainiigo nosaukumus. Jautaajums - kaa? Link to comment Share on other sites More sharing options...
CryRat Posted October 19, 2003 Report Share Posted October 19, 2003 ja pareizi sapratu ta ar for vai foreach vajadzētu sanākt... Link to comment Share on other sites More sharing options...
K|NG Posted October 19, 2003 Report Share Posted October 19, 2003 nivar saprast tieshi kaa Tev vaig? nu tipa shitaa mosh: http://paste.php.lv/463 Link to comment Share on other sites More sharing options...
Sliipeetais Posted October 19, 2003 Author Report Share Posted October 19, 2003 iedomaajies ja tev shaadaa stilaa jaaveido 1000 mainiigie... liels darbinsh, kaa arii tikpat liels kods. vajag panaakt, lai pats kods gjeneree shos maniigos un tad ielasa tos. gjeneree m1, ielasa to, saak ciklu no gala - gjeneree m2, ielasa to. u.t.t. cipars ir tas, kas aug. Link to comment Share on other sites More sharing options...
Sliipeetais Posted October 19, 2003 Author Report Share Posted October 19, 2003 viss kaartiibaa. situaaciju atrisinaaja $_GET[] - tas ir GET, POST var lasiit arii kaa kastes ;) paldies endrju. Link to comment Share on other sites More sharing options...
PheliX Posted October 25, 2003 Report Share Posted October 25, 2003 <code><font color="#000000"> <font color="#0000CC"><?php $m1</font><font color="#006600">=</font><font color="#0000CC">123</font><font color="#006600">; </font><font color="#0000CC">$m2</font><font color="#006600">=</font><font color="#0000CC">343</font><font color="#006600">; </font><font color="#0000CC">$m3</font><font color="#006600">=</font><font color="#0000CC">355</font><font color="#006600">; for(</font><font color="#0000CC">$i</font><font color="#006600">=</font><font color="#0000CC">1</font><font color="#006600">;</font><font color="#0000CC">$i</font><font color="#006600"><=</font><font color="#0000CC">3</font><font color="#006600">;</font><font color="#0000CC">$i</font><font color="#006600">++)echo </font><font color="#0000CC">$m$i</font><font color="#006600">.</font><font color="#CC0000">' '</font><font color="#006600">; </font><font color="#0000CC">?></font> </font> </code> Link to comment Share on other sites More sharing options...
Recommended Posts