<HTML>
<HEAD>
<TITLE>
</TITLE>
</HEAD>
<BODY>

<?php

// One-dimensional arrays
/* Supports indexed (keys/indices are integers) and 
	associative arrays (keys/indices are strings).
*/

echo "<P><BR><B>Now Arrays: </B><BR>\n";

$state = array();
$state[-1] = "DC";
$state[2] = "Nebraska";
$state[5] = "New York";
$state["large"] = "California";
$state[2.5] = "Nevada";
$state[abc] = 5;
echo $state[-1], "<BR>"; // Prints DC
// echo state[-1]; // ERROR
// echo "state[-1] = $state[-1]<BR>"; // ERROR
echo "state[-1] = {$state[-1]}<BR>"; // OK

echo "<BR>state[abc] = {$state[abc]} <BR>";
echo "<BR>state[\"abc\"] = {$state["abc"]} <BR>";

echo "state[2.5] = {$state[2.5]}<BR>";
echo "state[2.3] = {$state[2.3]}<BR>";
echo "state[2] = {$state[2]}<BR>";


echo $state['large'];
echo $state["large"];
echo $state[large];

echo "<BR>state[4] = $state[4]";

echo "$state<P>";
print "$state<P>";
print_r($state);

?>

</BODY>
</HTML>
