<?php
$arrayNewKeys = [
"first_name" => "Sudhir",
"last_lname" => "Gour",
"new_age" => 27,
"city" => "Jaipur",
"state" => "Jaipur",
"country" => "India"
];
ksort($arrayNewKeys);
print_r($arrayNewKeys); // Sorts an associate array in accordance to its keys.
To embed this program on your website, copy the following code and paste it into your website's HTML: