<?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.

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: