title: Can I Specify Strings for MySql Table Values?
body: <p>I have a MySql table that stores the users state and city from a list of states and cities. I specifically coded each state as their two letter shortened version (like WA for Washington and CA for California) and every city has the two letter abbreviation and the city name formated like this: Boulder Colorado would be <code>CO-boulder</code> and Salt Lake City, Utah would be <code>UT-salt-lake-city</code> as to avoid different states with same city name. The PHP inserts the value (<code>UT-salt-lake-city</code>) under the column <code>City</code>, but when I call the variable through PHP, it displays like this: <code>Your location is: UT-salt-lake-city, Utah.</code>
  To solve this, I've been making this list of variables</p>
  
  <pre><code>    if ($city == "AL-auburn") { $city = "Auburn"; }
      else if ($city == "AL-birmingham") { $city = "Birmingham"; }
      else if ($city == "GA-columbus") { $city = "Columbus"; $state = "Georgia"; }
      else if ($city == "AL-dothan") { $city = "Dothan"; }
      else if ($city == "AL-florence") { $city = "Forence"; }
      else if ($city == "AL-muscle-shoals") { $city = "Muscle Shoals"; }
      else if ($city == "AL-gadsden-anniston") { $city = "Gadsden Anniston"; }
      else if ($city == "AL-huntsville") { $city = "Huntsville"; }
      else if ($city == "AL-decatur") { $city = "Decatur"; }
      else if ($city == "AL-mobile") { $city = "Mobile"; }
      else if ($city == "AL-montgomery") { $city = "Montgomery"; }
      else if ($city == "AL-tuscaloosa") { $city = "Tuscaloosa"; }
  </code></pre>
  
  <p>Is there a way I can shorten this process or at least call it from a separate file so I don't have to copy/paste every time I want to call the location?</p>