Title: Example of adding a php code in a TablePress cell
Last modified: November 28, 2018

---

# Example of adding a php code in a TablePress cell

 *  Resolved [cpetsa](https://wordpress.org/support/users/cpetsa/)
 * (@cpetsa)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/example-of-adding-a-php-code-in-a-tablepress-cell/)
 * Hi,
 * I tried to add a PHP code in a TablePress cell using:
 * <?php echo “Hello world”;?>.
 * Although I already downloaded and activated the ‘PHP-in-tables’ extension, when
   I added the above example, in the cell, it did not work. The table cell just 
   appears blank. Can you please give me an example of a PHP code that it works 
   on a cell?
 * Thanks

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/example-of-adding-a-php-code-in-a-tablepress-cell/#post-10925057)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * This PHP code should work. Make sure that the Extension is really installed and
   activated. In addition, you might want to try turning off the TablePress output
   caching, by extending the Shortcode on the page to
 *     ```
       [table id=123 cache_table_output=false /]
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [cpetsa](https://wordpress.org/support/users/cpetsa/)
 * (@cpetsa)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/example-of-adding-a-php-code-in-a-tablepress-cell/#post-10925387)
 * Thanks.
 * However, if you write the PHP code in multiple lines like:
 * <?php
    echo “Hello World”; ?>
 * does not work. Is there any way to resolve this issue, cause the PHP code I want
   to use is more than 3 lines and it will be inefficient to try to write it in 
   just one line.
 * Thanks
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/example-of-adding-a-php-code-in-a-tablepress-cell/#post-10925402)
 * Hi,
 * for this, also add the Shortcode parameter
 *     ```
       [table id=123 cache_table_output=false convert_line_breaks=false /]
       ```
   
 * Regards,
    Tobias

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

The topic ‘Example of adding a php code in a TablePress cell’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/example-of-adding-a-php-code-in-a-tablepress-cell/#post-10925402)
 * Status: resolved