Question

(a) Here is the definition of a PHP function:

Recall that array $arr can be defined using a statement of the form: ) Give an array $arr such that test ($arr) printsBlue (ii) Give an array $arr such that test ($arr) prints Green Blue Violet ii) Give an array $arr such that test ($arr) prints Green Blue Blue Violet v) Give an array $arr (you need to select a different value of $arr [1] to the one you chose in your answer to a(iii) above) which prints Green Blue Blue Violet (b) Consider the following code fragment in a file index.php

State which variables are certainly set in next_page.php,thanks to the superglobals, and which may be set or not-depending on the behaviour of the user of index.php. You-need to give each variable in the following form:$_SUPERGLOBAL [ `variable'] where SUPERGLOBAL İSthe name of the superglobal where variable has been-set. Justify your answer. Assume that all the variables you mentioned in your answer-to (i) are set in next_page.php. What would a sequence of-echo statements (e.g., as in the code fragment below) for all-these super-global variable(s) print on screen? Give a possible output (variables can be printed in any order).

Question image 1Question image 2Question image 3Question image 4Question image 5Question image 6Question image 7Question image 8Question image 9Question image 10Question image 11Question image 12Question image 13Question image 14Question image 15Question image 16Question image 17