<?php $l = "Montgomery,-AL"; $states = []; $states["AL"] = "Alabama"; $states["MI"] = "Michigan"; $stateCode = substr($l, -2); $state = $states[$stateCode]; echo $state;
You have javascript disabled. You will not be able to edit any code.