Title: Add PHP code to HTML table
Last modified: August 21, 2016

---

# Add PHP code to HTML table

 *  Resolved [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/add-php-code-to-html-table/)
 * Hello… does anybody know how to include a PHP code into a HTML table?
 * Here is the html table:
 *     ```
       <table width=400 border="0" cellspacing="0" cellpadding="4">
       <tr>
       <td width="90">
       <form name="formSiegel" method="post" action="https://www.trustedshops.com/shop/certificate.php" target="_blank">
       <input type="image" border="0" src="{pfad/zum/siegel.png}" title="TrustedShops Gütesiegel - Bitte hier Gültigkeit prüfen!">
       <input name="shop_id" type="hidden" value="{value shop id}">
       </form>
       </td>
       <td align="justify">
       <form id="formTShops" name="formTShops" method="post" action="https://www.trustedshops.com/shop/protection.php" target="_blank">
       <input name="_charset_" type="hidden" value="">
       <input name="shop_id" type="hidden" value="{value shop id}">
       <input name="email" type="hidden" value="{value email}">
       <input name="amount" type="hidden" value="{value amount}">
       <input name="curr" type="hidden" value="EUR">
       <input name="paymentType" type="hidden" value="{value paymentType}">
       <input name="kdnr" type="hidden" value="{value kdnr}">
       <input name="ordernr" type="hidden" value="{value ordernr}">
       Als zusätzlichen Service bieten wir Ihnen den Trusted Shops Käuferschutz an. Wir übernehmen alle Kosten dieser Garantie, Sie müssen sich lediglich anmelden.
       <br><br>
       <input type="submit" id="btnProtect" name="btnProtect" value="Anmeldung zum Trusted Shops Käuferschutz">
       </form>
       </td>
       </tr>
       </table>
       ```
   
 * I want to replace the three values **{value email}**, **{value amount}** and **{
   value ordernr}** of the html table with the following three PHP lines (WooCommerce
   methods):
 *     ```
       <?php echo $order->billing_email ?>
       <?php echo $order->order_total ?>
       <?php echo $order->id ?>
       ```
   
 * What is the right way to do this? Just copy and paste the php lines into the 
   html table?
 * Best regards,
    Mike
 * [http://wordpress.org/plugins/woocommerce/](http://wordpress.org/plugins/woocommerce/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Beren](https://wordpress.org/support/users/berenerchamion/)
 * (@berenerchamion)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/add-php-code-to-html-table/#post-3970062)
 * There’s a bunch of plugins that do things like this. For example: [http://wordpress.org/plugins/wp-exec-php/](http://wordpress.org/plugins/wp-exec-php/)
 *  Thread Starter [onasol](https://wordpress.org/support/users/onasol/)
 * (@onasol)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/add-php-code-to-html-table/#post-3970187)
 * I have heard of these plugins but I was looking for something else. The topic
   is now resolved.
 * Thanks anyway!
 *  [davewatts](https://wordpress.org/support/users/davewatts/)
 * (@davewatts)
 * [11 years, 12 months ago](https://wordpress.org/support/topic/add-php-code-to-html-table/#post-3970331)
 * I have a webpage with a tool for formatting code as valid html for websites, 
   maybe it can help you
 * [https://www.ejectamenta.com/online-apps/code2html.html](https://www.ejectamenta.com/online-apps/code2html.html)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Add PHP code to HTML table’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [parameters](https://wordpress.org/support/topic-tag/parameters/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [post method](https://wordpress.org/support/topic-tag/post-method/)

 * 3 replies
 * 3 participants
 * Last reply from: [davewatts](https://wordpress.org/support/users/davewatts/)
 * Last activity: [11 years, 12 months ago](https://wordpress.org/support/topic/add-php-code-to-html-table/#post-3970331)
 * Status: resolved