Lab #7 - Task 7

Stephan Knotek

Task 7 - foreach Loop

  1. Write a simple array variable. In the array include five string values representing different languages from around the world.
  2. Outside of the loop create a header 2 that states: "Languages from around the world."
  3. Create a foreach loop where you now create a new variable that represents the values of the array variable you created in step 1.
  4. Write a statement that will display each language in the array as a list item. Your list can be either ordered or unordered.

Hint: Think about where the <ul> or <ol> need to go within the code in order for the page to display properly. Should the list opening and closing tags be inside or outside of the loop?

(Hint: Be sure to wrap the line you are displaying in paragraph tags, or use a line break or horizontal rule at the end of each line or everything will run together.)

Languages from around the world.