CryRat Posted June 7, 2003 Report Share Posted June 7, 2003 shitas nav isti jautajums un varat man neatbildet es tikai gribeju izteikt savu sashutumu par to ka palaizot shadu kodu <code><font color="#000000"> <font color="#0000CC"><? </font><font color="#006600">if (</font><font color="#0000CC">1 </font><font color="#006600">== </font><font color="#0000CC">0</font><font color="#006600">) { echo </font><font color="#CC0000">"=="</font><font color="#006600">; } else { if (</font><font color="#0000CC">1 </font><font color="#006600">< </font><font color="#0000CC">0</font><font color="#006600">) { echo </font><font color="#CC0000">"<"</font><font color="#006600">; } if (</font><font color="#0000CC">1 </font><font color="#006600"><= </font><font color="#0000CC">0</font><font color="#006600">) { echo </font><font color="#CC0000">"<="</font><font color="#006600">; } } else { if (</font><font color="#0000CC">1 </font><font color="#006600">> </font><font color="#0000CC">0</font><font color="#006600">) { echo </font><font color="#CC0000">">"</font><font color="#006600">; } if (</font><font color="#0000CC">1 </font><font color="#006600">>= </font><font color="#0000CC">0</font><font color="#006600">) { echo </font><font color="#CC0000">">="</font><font color="#006600">; } } </font><font color="#0000CC">?></font> </font> </code> man saka "Parsing Error: PHPDocument line 12 - parse error, unexpected T_ELSE" :o nu piedodiet bet kur tur kluda ? kapec lai pec else nevaretu but vel viens else ??? :angry: /me atkal cer ka nav kaut ko stulbu pateicis :unsure: Link to comment Share on other sites More sharing options...
CryRat Posted June 7, 2003 Author Report Share Posted June 7, 2003 WTF? tiko noskaidroju ka var shita <code><font color="#000000"> <font color="#0000CC"><? </font><font color="#006600">if (</font><font color="#0000CC">1 </font><font color="#006600">== </font><font color="#0000CC">0</font><font color="#006600">) echo </font><font color="#CC0000">"=="</font><font color="#006600">; else if (</font><font color="#0000CC">1 </font><font color="#006600">< </font><font color="#0000CC">0</font><font color="#006600">) echo </font><font color="#CC0000">"<"</font><font color="#006600">; if (</font><font color="#0000CC">1 </font><font color="#006600"><= </font><font color="#0000CC">0</font><font color="#006600">) echo </font><font color="#CC0000">"<="</font><font color="#006600">; else if (</font><font color="#0000CC">1 </font><font color="#006600">> </font><font color="#0000CC">0</font><font color="#006600">) echo </font><font color="#CC0000">">"</font><font color="#006600">; if (</font><font color="#0000CC">1 </font><font color="#006600">>= </font><font color="#0000CC">0</font><font color="#006600">) echo </font><font color="#CC0000">">="</font><font color="#006600">; </font><font color="#0000CC">?></font> </font> </code> :wacko: bla tad kapec es visu laiku rakstiju tos {} ??? :angry: blaaaa... laikam kaiminus pamodinaju... agh... /me pieliek pie Signature: "necieshu PHP !" un "sorry atkal kaut ko stulbu pateicu :(" Link to comment Share on other sites More sharing options...
Benvenuto Posted June 8, 2003 Report Share Posted June 8, 2003 nevar lietot else else else. princips ir taads: <code><font color="#000000"> <font color="#0000CC"><? </font><font color="#006600">if(</font><font color="#0000CC">$kaka </font><font color="#006600">== </font><font color="#0000CC">1</font><font color="#006600">) { echo </font><font color="#CC0000">"Forshi!"</font><font color="#006600">; } elseif(</font><font color="#0000CC">$kaka </font><font color="#006600">> </font><font color="#0000CC">1</font><font color="#006600">) { echo </font><font color="#CC0000">"SUPERFORSHI!"</font><font color="#006600">; } else { echo </font><font color="#CC0000">"Nekas nav forshi..."</font><font color="#006600">; } </font><font color="#0000CC">?> </font> </font> </code> if saakumaa un else beigaas tiek lietots. abi tikai vienreiz. savukaart elseif tu vari lietot cik tik uziet. kaapeec jaalieto { } ? starp { } iekljautie dati ir cikls. respektiivi (skaties kodaa) ja kaka buus vienaads ar 1, tad tiks izpildiits tikai zemaak iekljautais cikls un nekas cits. ;) Link to comment Share on other sites More sharing options...
CryRat Posted June 8, 2003 Author Report Share Posted June 8, 2003 ahg... tas bij stulbi no manas puses :( keybordu salauu pa velti... vo redi "Z" burts vairs gandriz nestrada :( labak ieshu gulet a to vel kaut ko tilu pateikshu... vai salauishu... nafig vini man nevareja atlaut normali rakstit if {} else {} else {} :( kads viniem mails shas aisutishu kaut ko :angry: lai visma kompense materialos zaudejumus... bla nav labi atkal saku kaut ko murgot :( Link to comment Share on other sites More sharing options...
Little_Hacker Posted June 8, 2003 Report Share Posted June 8, 2003 Nu veciit.. :) Else jau lieto tikai tad, kad iepseejamie varianti ir nochekoti ar if, vai if un elseif un tad ja neviens no tiem nav kaa tur jaabuut, tad iemachii else :) /me atkal neskaidri izsakaas :blink: Link to comment Share on other sites More sharing options...
K|NG Posted June 8, 2003 Report Share Posted June 8, 2003 Es ar, kad ieeju Tetanīm... vienmēr daudz ko jaunu atrodu :) Link to comment Share on other sites More sharing options...
tamster Posted June 8, 2003 Report Share Posted June 8, 2003 Kautkaa ljoti nelogjiska tev taa doma... Kaa kaut ko taadu vispaar var iedomaaties? :) Tikpat labi skriptus vareetu rakstiit taa: <code><font color="#000000"> <font color="#0000CC"><? </font><font color="#006600">echo </font><font color="#CC0000">"bla"</font><font color="#006600">; </font><font color="#0000CC">?> <? </font><font color="#006600">if(</font><font color="#0000CC">$param</font><font color="#006600">==</font><font color="#0000CC">2</font><font color="#006600">) echo </font><font color="#CC0000">"wow! divi!"</font><font color="#006600">; </font><font color="#0000CC">?> <? </font><font color="#FF9900">// Svariigs komentaars </font><font color="#0000CC">?> </font> </font> </code> :) Link to comment Share on other sites More sharing options...
CryRat Posted June 8, 2003 Author Report Share Posted June 8, 2003 Nu veciit.. Else jau lieto tikai tad, kad iepseejamie varianti ir nochekoti ar if, vai if un elseif un tad ja neviens no tiem nav kaa tur jaabuut, tad iemachii elsevispar tikai shodien paskatoties uz to kodu ierubijos cik stulbi vakar gribeju sachinit :( saprotams ka tas pilnigi nelogiski ka pec else ir vel viens else... Es ar, kad ieeju Tetanīm... vienmēr daudz ko jaunu atrodu vispar necieshu visus tos manualus... bet varbut tomer paskatishos... Kautkaa ljoti nelogjiska tev taa doma...Kaa kaut ko taadu vispaar var iedomaaties? ja tu doma to pashu kodu tad ne neutraucies es tadu nekur neizmantoju :D tas bij tikai lai paraditu kas man par problemu... un berni atceraties zalites pipeshana ar koda rakstishanu nav savietojama... beigsies ar to ka "Z" burts bus jaspiez tris reizes kamer nostradas... un jamekle pedejasi koda backups... nu labi nelietoju nekadas narkotiskas vielas vienkarshi nebiju izgulejies... un paedis... un sen neko nebiju spelejis... e varbut kads admins vai moderators varetu visu shito topiku izdzest ? domaju ka neviens neapvainosies... man kauns palika... Link to comment Share on other sites More sharing options...
Recommended Posts