Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

/* 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2014 Integration Services

Authors: Brian Knight, Devin Knight

1st Edition

1118850904, 9781118850909

More Books

Students also viewed these Databases questions