Question: (a) Here is a section of code in PHP: . Stotal-0 Sage = array (4, 12, 25, 8); for ($1-0; $i Age: $age [Si] -Ticket

 (a) Here is a section of code in PHP: . Stotal-0
Sage = array (4, 12, 25, 8); for ($1-0; $iAge: $age [Si]

(a) Here is a section of code in PHP: . Stotal-0 Sage = array (4, 12, 25, 8); for ($1-0; $iAge: $age [Si] -Ticket price: Sprice"; echo "The total is: stotal: (0 In line 3 there is a function call count (sage) . What value does it (il) Describe what the statement $i++ is meant to do. (ii) What is stored in the variable si when the loop stops? (iv) [1 mark] [1 mark] [1 mark] [1 mark 1 mark] return? (v) (vi) What is the ticket price for children under 5 years old? Write the number stored in the element age [2]. Write the outputs after the execution of the given section of code. [5 marks]

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!