That has nothing to do with the error I noted above.
This:
switch (substr($Mc_Adjust, -3, 3)){
case " Nw":
str_replace(" Nw", " NW", $Mc_Adjust);
break;
case " Sw":
str_replace(" Sw", " SW", $Mc_Adjust);
break;
case " Ne":
str_replace(" Ne", " NE", $Mc_Adjust);
break;
case " Se":
str_replace(" Se", " SE", $Mc_Adjust);
break;
}
might as well be this:
switch (substr($Mc_Adjust, -3, 3)){
case " Nw":
break;
case " Sw":
break;
case " Ne":
break;
case " Se":
break;
}
since statements like this:
str_replace(" Nw", " NW", $Mc_Adjust);
don't actually do anything (well, it does something, but the returned value isn't captured and thus the net result is nothing will change).