I can't put a <td> in my <table> in php

Hello,

I’m working on a php snippet and i made a table. I tried putting a

inside but when i do this, a lot disappears. This is my code:
ini_set('display_errors', 1);
    //Create the client object
    $soapclient = new SoapClient('http://109.135.9.204:6394/ws/r/CarplusService?WSDL');
   
    //Use the functions of the client, the params of the function are in 
    //the associative array
    $params = array('customerid' => '1532');
    $response = $soapclient->ca_customer_products($params);
	echo '<table><tbody><tr><th>Product</th><th>Naam</th><th>Prijs</th><th>Qte</th></tr>';
	echo '<table style="border-style: solid; border-width:1px;">';
	foreach($response->list->element as $product) {
      if($product->stock > 0) {
      echo '<tr>';
      echo '<td style="display: flex; border: 1px solid black;">';
      //echo '<td>';
      echo '<img src="' . $product->url . '" />';
      //echo '</td>';
      print_r($product->description);
      echo "<p style='color:green;'>".$product->price1."</p>";
      echo "<p style='color:red; text-decoration: line-through'>".$product->price2."</p>"; 
      print_r($product->price1);
      print_r($product->price2);
      print_r($product->stock);
	  echo '</tr>';  
      }
  }
  echo '</tbody></table>';

The code behind the // is where i tried to put the td tag but when i put it there, the images that normally appear go blank and when i inspect my code there is a lot of other code that also disappears. What am i doing wrong here?

Thank you for your help!

Why are you nesting the table definition?

Sponsor our Newsletter | Privacy Policy | Terms of Service