our approach
|
contact us
PHP Basics In Pictures
Basics
Variables
Numbers
User functions
Logic & Loops
Files
Employ lists of variables
Create lists of number variables
Create a new script with this code:
<?php
# This script demonstrates how to
# create a numeric array.
@AcmeInventory = (178,286,387);
print "$AcmeInventory[0]<br>\n";
print "$AcmeInventory[1]<br>\n";
print "$AcmeInventory[2]<br>\n";
print "<p>We just created a list of numbers using an array variable!";
?>
Save the script as
numberlist.php
in the
PHPSCRIPTS
folder.
<< BACK
NEXT >>