I have create a Short-Code to list all the item name as follow,

```
add_shortcode( 'show_cart_items', 'tcf_show_cart_items' );
function tcf_show_cart_items()
{
    $cart   =   '<table>';
                foreach(  WC()->cart->get_cart() as $cart_item )
                {
                    $cart .= '<tr>' . $cart_item['data']->get_title() . '</tr>';
                }
    $cart   .=  '</table>';

    return $cart;
}

```

this is working fine but what I am facing is the items printing out of the table. You can see the output as screenshot when I inspecting on the web page and item name which was not printing in side the HTML table is highlighted in yellow.

[![enter image description here](https://i.stack.imgur.com/pWIOW.png)](https://i.stack.imgur.com/pWIOW.png)

My questions are,

1. What is the reason for this?
2. How to fix this?

TIA.