Wäre es effizienter, die Kosten für jeden Typ unterschiedlich zu gestalten, um sie direkt in der Tabelle zu definieren?

It may be more efficient to define the costs for each type directly in the table to easily access and update them. This approach can simplify the code and make it easier to manage different costs for each type.

// Define an associative array to store the costs for each type
$costs = [
    'type1' => 10,
    'type2' => 20,
    'type3' => 30,
];

// Access the cost for a specific type
$costOfType1 = $costs['type1']; // This will return 10
$costOfType2 = $costs['type2']; // This will return 20
$costOfType3 = $costs['type3']; // This will return 30