Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I\'m working on a webpage and I must use php to create a menu .For this “menu” I

ID: 3760047 • Letter: I

Question

I'm working on a webpage and I must use php to create a menu .For this “menu” I have to define an array that contains the labels for it (headings could be One, Two, Three). I then have to use a loop to display the array elements as a list of links. When a link is selected the appropriate information must be displayed (there are a few line of text that go along with each heading).

My instructor notes that: there may be conditional logic that will be required to add the class=”active” attribute to the correct <li> element. Also, notice that the page itself will not be re-directed but it will be the content on the page being displayed that needs to change as you select different links.

I think I understand getting the array set up, I'm not sure how to get the information to be displayed.

Explanation / Answer

For this “menu” I have to define an array that contains the labels for it (headings could be One, Two, Three). I then have to use a loop to display the array elements as a list of links. When a link is selected the appropriate information must be displayed (there are a few line of text that go along with each heading).
My instructor notes that: there may be conditional logic that will be required to add the class=”active” attribute to the correct <li> element.