Böyle bir şey mi istiyorsun
<!DOCTYPE html>
<html>
<head>
    <title>Raf Listesi</title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
</head>
<body>

<?php
$raflar = array(
    array("Raf Adı" => "A", "Kat Sayısı" => 5, "Bölme Sayısı" => 2),

);

function rafOlustur($rafAdi, $katSayisi, $bolumeSayisi)
{
    echo "<div class='container mt-4'>";
    echo "<h3>Raf Adı: $rafAdi</h3>";
    echo "<div class='row'>";
    for ($i = 1; $i <= $katSayisi; $i++) {
        echo "<div class='col'>";
        echo "<table class='table table-bordered'>";
        echo "<tr>";
        for ($j = 1; $j <= $bolumeSayisi; $j++) {
            $bolumAdi = $rafAdi . '-' . $i . $j;
            echo "<td><i class='fas fa-box'></i> $bolumAdi</td>"; // Raf ikonu eklendi
        }
        echo "</tr>";
        echo "</table>";
        echo "</div>";
    }
    echo "</div>";
    echo "</div>";
}

foreach ($raflar as $raf) {
    $rafAdi = $raf["Raf Adı"];
    $katSayisi = $raf["Kat Sayısı"];
    $bolumeSayisi = $raf["Bölme Sayısı"];
    rafOlustur($rafAdi, $katSayisi, $bolumeSayisi);
}
?>

<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>

</body>
</html>