Midterm re-score
(Please submit your PHP file via facebook message to me within Thursday 19th Nov.)
Question
1. Create a PHP web page using Adobe Dreamweaver. The page title is "Midterm re-score".
2. Create a function to return the length of the input.
3. Create an indexed array of 5 capital city names in English. Then call the function to return the length of each input.
4. For each returned value, display the result “ contains characters.”
5. The last result must be “The total length of all capital city names is .”
6. Create an associative array of your 5 cities with the named key as your city name and the value as its length; e.g. "Bangkok" => "7". Then loop through the array to find the total sum of all cities’ lengths. Display the result as "The total length from the associative array is ."
7. Save your web page. The filename must be “midterm_yourname.php”. (Replace “yourname” with your first name)0