Girl Develop It Buffalo

PHP for Beginners Class 2
Homework Exercises

Home

Exercise 1

Let's expand My Packing Helper from the first homework assignment. Create a trip information array that contains information about your trip, including but not limited to Destination, Number of Travel Days, Mode of Transit, Purpose of Travel, and so forth. Write a displayTripInfo function to display this travel information.

Exercise 2

Write a function that will take your trip information array and will output 'Wow, this is going to be a long trip!' if the number of travel days is 7 or more, or 'This will be a good amount of time to be away' if travel days is between 5 and 3 days, or 'This will be a whirlwind trip' if travel days is 2 or less.