Title: Use the &quot;export&quot; function in a php script
Last modified: August 20, 2016

---

# Use the "export" function in a php script

 *  Resolved [phate867](https://wordpress.org/support/users/phate867/)
 * (@phate867)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/use-the-export-function-in-a-php-script/)
 * I see that this plugin has an export function, I gave an eye to code and I came
   up with this:
    `require_once(“wp-load.php”); require_once(“wp-content/plugins/
   wp-table- reloaded/classes/export.class.php”);
 *  $db = new WP_Table_Reloaded_Export();
    $db->export_format = ‘xml’; $db->table_to_export[‘
   data’] = ‘TableName’; $output = $db->export_table(); echo $output;
 * it should print me the xml representation of the table..but it doesn’t, can you
   help me out please?
 * [http://wordpress.org/extend/plugins/wp-table-reloaded/](http://wordpress.org/extend/plugins/wp-table-reloaded/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/use-the-export-function-in-a-php-script/#post-3168523)
 * Hi,
 * thanks for your post.
 * I’m not really sure that this approach is a good idea. First, including WordPress
   into an external script like this, as this can lead to a lot of overhead. Instead,
   it should probably be easier to include the desired functionality into a small
   WordPress plugin.
 * So, if you could explain shortly what you are trying to achieve, I’ll gladly 
   try to explain the best way to tackle this.
 * Also note that his XML representation is rather useless outside of WP-Table Reloaded,
   as it is not a common XML format, but a special format.
 * Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Use the "export" function in a php script’ 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/use-the-export-function-in-a-php-script/#post-3168523)
 * Status: resolved