Newbie Posted April 18, 2020 Report Share Posted April 18, 2020 (edited) Labdien! Vai var kāds dot padomu kā apvienot skaitļus, jeb uztaisīt tos īsākus piemēram ir masīvs, kurā ir array(1) { [0]=> "1" [1]=> "2" [2]=> "3" [3]=> "4" } Jautājums kā ciklā aiztāt šos skaitļus piemēram 1.-4. nevis 1, 2, 3, 4. attiecīgi mazāko un lielāko. piemēram ja array(2) { [0]=> "4" [1]=> "5" } ir 4 un 5 tad 4.-5. Edited April 18, 2020 by Newbie Quote Link to comment Share on other sites More sharing options...
e-remit Posted April 18, 2020 Report Share Posted April 18, 2020 Būtu labi sākt ar to, ja tu iedotu savu, kaut vai nestrādājošu versiju. Quote Link to comment Share on other sites More sharing options...
Kasspars Posted April 19, 2020 Report Share Posted April 19, 2020 min($numbers).' - '.max($numbers) Quote Link to comment Share on other sites More sharing options...
Faks Posted April 20, 2020 Report Share Posted April 20, 2020 izklausas pec array_map vai ari array_replace_recursive ir daudz vel citi veidi ka to atrisinat atkarigs no zinasanam ka velas to risinat. Quote Link to comment Share on other sites More sharing options...
ViktorsN Posted April 22, 2020 Report Share Posted April 22, 2020 https://stackoverflow.com/questions/11875006/group-php-array-numbers - ja nu nepieciešams sagrupēt vairākās grupās Quote Link to comment Share on other sites More sharing options...
aaxc Posted April 24, 2020 Report Share Posted April 24, 2020 Šis izklausās pēc mājasdarba .. 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.