Please code the arrays. This is in PHP/HTML
Perform some calculations:
1. $ages = [24, 12, 10, 17, 23, 29, 35, 32, 30, 22] Using a FORloop, calculate the sum and average of these numbers, then printthem. Please provide legible output.
2. If I change the array to $ages = [1 => 24, 12, 10, 17, 23,29, 35, 32, 30, 22] How will the program change? Re-run the programand provide output
3. Assume that the above array is an associative array asfollows:
$ages = ['Sam' => 24, 'Tina' => 12, 'Liz' => 10, 'Tom'=> 17, 'Dave' => 23, 'Sandra' => 29, 'Kris' => 35,'Mike' => 32, 'Daja' => 30, 'Rajan' => 22]
Write a program to print each name and its associated age on asingle line; i.e., Sam => 24 . . . and so on