Firstly, is it a fixed requirement that you must store such codes in the database? If not, then a better idea is to have more than one database table. You need one table to store the items (Stove, Refrigerator, etc), another table to store say, the buyer info, then a third table to serve as a join table between the items and the buyers (if that is your model).
If the requirement cannot be removed, then I would do something along these lines:
$items = array(
'A' => 'Brick',
'B' => 'Aluminum',
'C' => 'Wood',
'D' => 'Cedar',
'E' => 'Vinyl',
'F' => 'Stone',
'G' => 'Log',
'H' => 'Block/Concrete',
'Y' => 'Other');
$len = strlen($code);
for ($i = 0; $i < $len; ++$i)
{
echo $items[$code[$i]] . "<br />\n";
}
If it is possible that the code may contain an invalid index, then I would change:
echo $items[$code[$i]] . "<br />\n";
to:
echo (array_key_exists($code[$i], $items) ?
$items[$code[$i]] : 'Invalid Index!') . . "<br />\n";