Question: /* 09: Create an associative array named vh with the following key / value pairs: vocals: Dave guitar: Eddie bass: Michael drums: Alex Output the

/* 09: Create an associative array named vh with the following

key / value pairs:

"vocals": "Dave"

"guitar": "Eddie"

"bass": "Michael"

"drums": "Alex"

Output the following phrase using the vh array associations:

"Van Halen band members include Dave, Eddie, Michael, and Alex."

*/

/*10: Loop through the vh associative array with foreach.

Output "Key: vocals, Value: Dave" and repeat for each key/value pair

*/

/*11: Create a function named simpleMsg that outputs

"Here is a simple message" when it is called.

Remember to call the function, too.

*/

/*12: Create a function named hello that has a

$name parameter and outputs "Hello Dave!" when

it is called, and the value of the argument

passed in is "Dave". It should work with other

values, too.

Remember to call the function with the argument.

*/

$myName = "Walt";

// Don't change the value of $myName above

/* NOTE: It is important to understand the variable name

that holds the argument value does NOT have to be

the same as the $name parameter in the definition

of the function. Functions should be reusable.

You should be able to pass in different argument

variables and your function should still work.

*/

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!