Mikijs Posted April 22, 2009 Report Share Posted April 22, 2009 Sveiki PHP. Nāku pie Jums ar lūgu padalīties informācijā / skriptā kā sakārtot masīvu array ( [vertiba_0] => 35 [vertiba_1] => 12 [vertiba_2] => 22 [vertiba_3] => 62 [vertiba_4] => 43 [vertiba_5] => 31 [vertiba_6] => 27 ); augošā secībā array ( [vertiba_0] => 12 [vertiba_1] => 22 [vertiba_2] => 27 [vertiba_3] => 31 [vertiba_4] => 35 [vertiba_5] => 43 [vertiba_6] => 62 ); ceru uz atsaucību. Quote Link to comment Share on other sites More sharing options...
bubu Posted April 22, 2009 Report Share Posted April 22, 2009 sort? Tev tās atslēgu vērtības arī svarīgas? Tad izvelc vispirms atslēgas un vērtības atsevišķi, tad sakārto ar sort vērtības un tad saliec kopā atpakaļ tās atslēgas ar jaunajām vērtībām. Quote Link to comment Share on other sites More sharing options...
Mikijs Posted April 22, 2009 Author Report Share Posted April 22, 2009 mja paldies, ne atslegu vertibas nav svarigas. <?=sort($masivs)?> ja nu kadsn esaprata.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.