Title: Pull second variable from table for display
Last modified: August 21, 2016

---

# Pull second variable from table for display

 *  [Mcrat](https://wordpress.org/support/users/mcrat/)
 * (@mcrat)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/pull-second-variable-from-table-for-display/)
 * Hi there – just wondering if it’s possible to grab a second variable from the
   table in the same way you grab $snippet?
 * For example, if I wanted to also display the value of randomtext_id from the 
   table.
 * I assumed I could just add to what was there e.g.
 * $snippet2 = do_shortcode($row->randomtext_id);
    return $snippet2
 * and then in function widget call $snippet2 in the same way you call $snippet 
   from there and echo it accordingly, but this doesn’t work.
 * I assume it would be possible, but I haven’t been able to work out how (novice
   at php). Any help would be appreciated.
 * Thanks!
 * [https://wordpress.org/plugins/randomtext/](https://wordpress.org/plugins/randomtext/)

The topic ‘Pull second variable from table for display’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/randomtext.svg)
 * [Random Text](https://wordpress.org/plugins/randomtext/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/randomtext/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/randomtext/)
 * [Active Topics](https://wordpress.org/support/plugin/randomtext/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/randomtext/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/randomtext/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Mcrat](https://wordpress.org/support/users/mcrat/)
 * Last activity: [12 years, 2 months ago](https://wordpress.org/support/topic/pull-second-variable-from-table-for-display/)
 * Status: not resolved