Optimize this code
#1

how do I optimize this code to reduce lines and makes more understandable?

PHP код:
        if(GetVehicleEngineType(modelid) == 'H')
        {
            
format(typestr16"Human Powered");
        }
        else if(
GetVehicleEngineType(modelid) == 'D')
        {
            
format(typestr16"Diesel");
        }
        else if(
GetVehicleEngineType(modelid) == 'P')
        {
            
format(typestr16"Petrol");
        }
        else if(
GetVehicleEngineType(modelid) == 'E')
        {
            
format(typestr16"Electric");
        } 
Reply


Messages In This Thread
Optimize this code - by Dice_ - 04.07.2018, 10:34
Re: Optimize this code - by Dice_ - 04.07.2018, 10:43
Re: Optimize this code - by Calisthenics - 04.07.2018, 14:33

Forum Jump:


Users browsing this thread: 1 Guest(s)