PHP Constants

ITEM_NAME = USB drive

ITEM_PRICE = $15

3 USB drives cost $45 at $15 each.

Explanation

A constant is a named value that remains the same after it is defined during a PHP script. Here, the item name and price are constants, and I access them without a dollar sign. A variable such as $quantity does use a dollar sign and can be assigned another value later, changing the total.

Back to Activity 3