Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Como classificar array pela chave e pelo valor, sem perder o valor original da chave?

<?php

$array = array
(
 71 => 100,
 70 => 100,
 69 => 23.53,
 68 => 74.07,
 67 => 23.29,
 66 => 61.01,
 59 => 100,
 3 => 35,
 1 => 56.18
);
echo "<pre>";
var_export($array);
asort($array);
var_export(array_reverse($array, true));

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.