Here is my link structure:
./showities.php?stateid=05
code contained in showcities.php:
It's not echoing the expected value "CA".
I think I did something wrong when I defined the $stateabrev variable.
./showities.php?stateid=05
code contained in showcities.php:
Code:
<?php
$stateid = $_GET['stateid'];
$array_state_id[01] = 'AL';
$array_state_id[02] = 'AK';
$array_state_id[03] = 'AZ';
$array_state_id[04] = 'AR';
$array_state_id[05] = 'CA';
$array_state_id[06] = 'CO';
$array_state_id[07] = 'CT';
$array_state_id[08] = 'DE';
$stateabrev = $array_state_id[$stateid];
echo $stateabrev;
?>
I think I did something wrong when I defined the $stateabrev variable.