Question: 1. Finish the following PHP code problem. Given the provided array of countries, output the information in the array using one or more loops within
1. Finish the following PHP code problem. Given the provided array of countries, output the information in the array using one or more loops within a two-column HTML table. The first column will display the country name and the second column the capital city name. Make the country name a link to country.php; pass the country code (the first element in the array) as a query string with a name of code (e.g., country.php?code=AR).
$countries = array(
array("AR","Argentina","Buenos Aires"),
array("AT","Austria","Vienna"),
array("BE","Belgium","Brussels"),
array("CA","Canada","Ottawa")
);
2. Write the PHP and the rest of the markup necessary to display the country names from the Countries table (fields=id, name, capital, population) in a drop-down list. When the user clicks the submit button, the page should then display below the drop-down list the capital and population of the selected country. For simplicity sake, dont worry about SQL injection. Assume that this page is called country.php.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
