"); echo ("Info Tech Tool 2 = " . $_POST['tool2']); echo ("
"); // use function displayPostArray to be able to display contents of $_POST // in a way that is flexible in terms of items stored in $_POST displayPostArray($_POST); // define functions ... it is okay that they are defined after they are being called // function displayPostArray ($postarray) { // echo ("displayPostArray.
"); // want to loop through each item of associative array // Use of => is similar to the regular = assignment operator, // except that you are assigning a value to an index and not to a variable. // "as" is used to assign a specific element of array to variable $tool // and => is used to assign value associated with $tool to the variable $score foreach ($postarray as $tool => $score) { echo "$tool" . " = " . "$score
"; } // } ?>