Here’s what the relevant lines in this script do:

  • @AcmeInventory = (178,286,387);

    The numbers 178, 286, and 387 are assigned to the array variable @AcmeInventory.

  • print "$AcmeInventory[0]<br>\n";

    Prints the first number in the array, the number 178.

  • print "$AcmeInventory[1]<br>\n";

    Prints the second number in the array, the number 286.

  • print "$AcmeInventory[2]<br>\n";

    Prints the third number in the array, the number 387.

  1. Upload numberlist.php to the phpscripts directory on the Web server.
  2. Open phplinks.html and insert a new link to numberlist.php:

    <p><a href="http://www.yourwebsite.com/phpscripts/numberlist.php">8. Create a list of numbers.</a></p>
  3. Save phplinks.html, then upload it to the home directory in your Web site.