Title: do_shortcode with variable
Last modified: August 22, 2016

---

# do_shortcode with variable

 *  Resolved [javiersl](https://wordpress.org/support/users/javiersl/)
 * (@javiersl)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/do_shortcode-with-variable/)
 * I need to use the shortcode and php, to do what I do with do_shortcode,
 * example:
    <?php echo do_shortcode(‘[stripe name=”The Awesome Store” description
   =”The Book of Awesomeness” amount=”500″]’) ;?>
 * But I need to put a variable in the amount field
 * example:
    <?php echo do_shortcode(‘[stripe name=”The Awesome Store” description
   =”The Book of Awesomeness” amount=”$amount”]’) ;?>
 * How I can do to work with a variable in the amount field?
 * Thanks
 * [https://wordpress.org/plugins/stripe/](https://wordpress.org/plugins/stripe/)

Viewing 1 replies (of 1 total)

 *  [Phil Derksen](https://wordpress.org/support/users/pderksen/)
 * (@pderksen)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/do_shortcode-with-variable/#post-5317189)
 * Looks like a duplicate post. Answered here:
    [https://wordpress.org/support/topic/shortcode-in-php-4](https://wordpress.org/support/topic/shortcode-in-php-4)

Viewing 1 replies (of 1 total)

The topic ‘do_shortcode with variable’ is closed to new replies.

 * ![](https://ps.w.org/stripe/assets/icon-256x256.png?rev=2784844)
 * [Stripe Payment Forms by WP Simple Pay - Accept Credit Card Payments + Subscriptions with Stripe](https://wordpress.org/plugins/stripe/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stripe/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stripe/)
 * [Active Topics](https://wordpress.org/support/plugin/stripe/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stripe/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stripe/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Phil Derksen](https://wordpress.org/support/users/pderksen/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/do_shortcode-with-variable/#post-5317189)
 * Status: resolved