How can PHP developers ensure that background images in table cells are resized properly to fit the cell size?

When setting background images in table cells in HTML, PHP developers can ensure that the images are resized properly to fit the cell size by using CSS properties like `background-size: cover;` or `background-size: contain;`. These properties will ensure that the background image is scaled proportionally to cover or fit the entire cell without distorting the image.

echo '<style>
        .table-cell {
            background-image: url("image.jpg");
            background-size: cover; /* or background-size: contain; */
            background-repeat: no-repeat;
            background-position: center;
        }
      </style>';

echo '<table>
        <tr>
            <td class="table-cell">Cell with background image</td>
            <td class="table-cell">Another cell with background image</td>
        </tr>
      </table>';