1<?php
2$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
3asort($fruits);
4foreach ($fruits as $key => $val) {
5 echo "$key = $val\n";
6}
7?>
8//Would output:
9c = apple
10b = banana
11d = lemon
12a = orange
1$arr = array(1, 2, 3);
2unset($arr[0]);
3$arr = array_values($arr);
4
5print_r($arr);
6//Array ( [0] => 2 [1] => 3 )
7