Difference between sort(), asort() and ksort in php

sort():
sorts an array by the values.

Syntax
sort(arr,type)

Example:
<?php
$arr = array("a" => "Blue", "b" => "White", "c" => "Orange");
sort($arr);
print_r($arr);
?>
Output:
Array
(
[0] => Blue
[1] => Orange
[2] => White
)
asort():
sorts an array by the values but keep their original keys.

Syntax
asort(arr,type)

Example:
<?php
$arr = array("a" => "Blue", "b" => "White", "c" => "Orange");
sort($arr);
print_r($arr);
?>
Output:
Array
(
[a] => Blue
[c] => Orange
[b] => White
)

ksort():
sorts an array by the keys.

Syntax
ksort(arr,type)

Example:
<?php
$arr = array("a" => "Blue", "b" => "White", "c" => "Orange");
sort($arr);
print_r($arr);
?>
Output:
Array
(
[a] => Blue
[c] => White
[b] => Orange
)