Subject: PHP

Array Indexing and Arithmetic Operations

Create an array $numbers = [2, 4, 6, 8]. Use arithmetic operators to calculate the sum of all numbers in the array and display the result.

Select file or drag and drop

PNG, JPG, SVG

Preview