Title: [Plugin: WP-Table Reloaded] PHP code inside table
Last modified: August 20, 2016

---

# [Plugin: WP-Table Reloaded] PHP code inside table

 *  Resolved [ajmal017](https://wordpress.org/support/users/ajmal017/)
 * (@ajmal017)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-php-code-inside-table/)
 * Ok I am using – WordPress along with WP PHP exec ( [exec] php code [/exec]
 * I am using this table also – What I did was write the php function within [exec]
   codes and after ending then with [/exec]
 * Below a line i pasted the table link [table id=2 /]
 * i inserted in the table data field – [exec] echo $mycsvfile[0][1]; [/exec] – 
   it was not executed and was returned as it is written
 * then i tried <?php echo $mycsvfile[4][6]; ?> – a black field was returned..
 * Why is the php output not returned in the table ?
 * $mycsvfile is defined in the same page above after which i write the table link…
 * But when I put just echo $mycsvfile[4][6]; within the [exec] codes – i see the
   output..
 * Pls advice
 * [http://wordpress.org/extend/plugins/wp-table-reloaded/](http://wordpress.org/extend/plugins/wp-table-reloaded/)

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-php-code-inside-table/#post-2371209)
 * Hi,
 * this is a little bit complicated, because you are trying to connect content from
   outside a table with content inside a table.
 * You could try to use the Extension: [http://tobias.baethge.com/2010/02/extension-5-how-to-use-php-in-table-cells/](http://tobias.baethge.com/2010/02/extension-5-how-to-use-php-in-table-cells/)
   
   Maybe that helps.
 * Additionally, you might need to make `$mycsvfile` global in the table cell first,
   by adding `global $mycsvfile;` before using the variable.
 * Regards,
    Tobias
 *  [snobbycloud](https://wordpress.org/support/users/snobbycloud/)
 * (@snobbycloud)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-php-code-inside-table/#post-2371249)
 * Hi Tobias,
 * i got the php code partly to work,
    a typical echo works fine <?php echo “TEST”;?
   > however echo variable fails <?php echo $current_owner;?>
 * the variable echo work fine before and after the table.
    any idea what I’m missing
   here? thx, Daniel
 *  [snobbycloud](https://wordpress.org/support/users/snobbycloud/)
 * (@snobbycloud)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-php-code-inside-table/#post-2371250)
 * no need to answer found a fix within another post:
    [http://wordpress.org/support/topic/plugin-wp-table-reloaded-php-extensions-dont-show-variables?replies=21](http://wordpress.org/support/topic/plugin-wp-table-reloaded-php-extensions-dont-show-variables?replies=21)
 * thx
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-php-code-inside-table/#post-2371251)
 * Hi,
 * yes, you probably had to add the global call 🙂
    Nice that you found the solution!
 * Best wishes,
    Tobias

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

The topic ‘[Plugin: WP-Table Reloaded] PHP code inside table’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wp-table-reloaded_f7dcd3.svg)
 * [WP-Table Reloaded](https://wordpress.org/plugins/wp-table-reloaded/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-table-reloaded/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-table-reloaded/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-table-reloaded/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-table-reloaded/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-table-reloaded/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-wp-table-reloaded-php-code-inside-table/#post-2371251)
 * Status: resolved