Code and Review???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I'm still pretty new to MySQL, OO PHP and Javascript. Wanted a couple of you to review the multidimensional array code and let me know if this code is ok? Also, would like for a couple of you to go to my webpage http://homepage.mac.com/ateam3/ateam3/freemain.htm and slide down to the "Some Work Examples:" and click on my test site. Give me a review on this demo and let me know your thoughts... only if you have some extra time. Wanting to hear from some of the intermediate and advanced programmers on where I'm at. Currently self-employed (actually unemployed, but want to stay positive) and debating on my next J-o-b vs current skills. Thanks to all in advance. :)


Code >>>

function getwstate()
{
$stateval = array( "0" => array ("AL", "Alabama"),
"1" => array ("AK", "Alaska"),
"2" => array ("AS", "American Samoa"),
"3" => array ("AZ", "Arizona"),
"4" => array ("AR", "Arkansas"),
"5" => array ("CA", "California"),
"6" => array ("CO", "Colorado"),
"7" => array ("CT", "Connecticut"),
"8" => array ("DE", "Delaware"),
"9" => array ("DC", "District of Columbia"),
"10" => array ("FM", "Fed. States of Micronesia"),
"11" => array ("FL", "Florida"),
"12" => array ("GA", "Georgia"),
"13" => array ("GU", "Guam"),
"14" => array ("HI", "Hawaii"),
"15" => array ("ID", "Idaho"),
"16" => array ("IL", "Illinois"),
"17" => array ("IN", "Indiana"),
"18" => array ("IA", "Iowa"),
"19" => array ("KS", "Kansas"),
"20" => array ("KY", "Kentucky"),
"21" => array ("LA", "Louisiana"),
"22" => array ("ME", "Maine"),
"23" => array ("MH", "Marshall Islands"),
"24" => array ("MD", "Maryland"),
"25" => array ("MA", "Massachusetts"),
"26" => array ("MI", "Michigan"),
"27" => array ("MN", "Minnesota"),
"28" => array ("MS", "Mississippi"),
"29" => array ("MO", "Missouri"),
"30" => array ("MT", "Montana"),
"31" => array ("NE", "Nebraska"),
"32" => array ("NV", "Nevada"),
"33" => array ("NH", "New Hampshire"),
"34" => array ("NJ", "New Jersey"),
"35" => array ("NM", "New Mexico"),
"36" => array ("NY", "New York"),
"37" => array ("NC", "North Carolina"),
"38" => array ("ND", "North Dakota"),
"39" => array ("MP", "Northern Mariana Is."),
"40" => array ("OH", "Ohio"),
"41" => array ("OK", "Oklahoma"),
"42" => array ("OR", "Oregon"),
"43" => array ("PW", "Palau"),
"44" => array ("PA", "Pennsylvania"),
"45" => array ("PR", "Puerto Rico"),
"46" => array ("RI", "Rhode Island"),
"47" => array ("SC", "South Carolina"),
"48" => array ("TN", "Tennessee"),
"49" => array ("TX", "Texas"),
"50" => array ("UT", "Utah"),
"51" => array ("VT", "Vermont"),
"52" => array ("VA", "Virginia"),
"53" => array ("VI", "Virgin Islands"),
"54" => array ("WA", "Washington"),
"55" => array ("WV", "West Virginia"),
"56" => array ("WI", "Wisconsin"),
"57" => array ("WY", "Wyoming") );
$stcnt = count($stateval);
echo '<select name="wstate" size="1" />';
if ($this->wstate == '')
{
echo '<option value="" selected>No Selection</option>';
for ($x = 0; $x < $stcnt; $x++)
{
echo '<option value="'.$stateval[$x][0].'">'.$stateval[$x][1].'</option>';
}
}
else
{
for ($x = 0; $x < $stcnt; $x++)
{
if ($stateval[$x][0] == $this->wstate)
{
echo '<option value="'.$stateval[$x][0].'" selected>'.$stateval[$x][1].'</option>';
}
else
{
echo '<option value="'.$stateval[$x][0].'">'.$stateval[$x][1].'</option>';
}
}
}
echo '</select>';
}


End of Code >>>

:)
  Gale L. Allen Jr
  Macintosh Support Specialist
  Phone: 919/412-5039
  Homepage: http://homepage.mac.com/ateam3/Menu5.html
  iChat = ateam3@mac.com
  "Remember, It's only Rock 'n Roll, but I like it!"
(:

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux