please how can i get e.g. the last key in array. PHP: $array1 = [0 => "one", 1 => "two", 2 => "three"];$array2 = [0 => 65, 1 => 484, 2 => 474];sort($array2) and now i want to get index from array1 using the last key from array2
Actually, there is a function called ksort and another called aksort. Anyway, end(array_keys($array2))
it should return map name, but it return index or some integer or not? xD so what is wrong please? i didnt find anything. PHP: public $allVotes = ['BedWars1', 'BedWars2', 'Chinese', 'Kingdoms', 'Nether', 'STW5'];public $stats = [];$this->currentTable = array_rand($this->allVotes, 3);$this->stats = [1 => 4, 2 => 5, 3 => 1];$stats = $this->stats;sort($this->stats);$map = $this->currentTable[array_keys($stats)[2] - 1]; //$map should be map one name from allVotes but it is integer