Title: troubleshoot this shortcode with variable
Last modified: August 22, 2016

---

# troubleshoot this shortcode with variable

 *  [bsapaka](https://wordpress.org/support/users/bsapaka/)
 * (@bsapaka)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/troubleshoot-this-shortcode-with-variable/)
 * I am not sure if my brackets inside the `[php]` tags are messing up the code.
   Here is what I have:
 * `[php]`
    `$img_ids = 432,232;` `do_shortcode('[gallery ids='.$img_ids.']'));``[
   php]`
 * Please advise on how to fix
    Thanks!
 * [https://wordpress.org/plugins/allow-php-in-posts-and-pages/](https://wordpress.org/plugins/allow-php-in-posts-and-pages/)

The topic ‘troubleshoot this shortcode with variable’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/allow-php-in-posts-and-pages_edefed.
   svg)
 * [Allow PHP in Posts and Pages](https://wordpress.org/plugins/allow-php-in-posts-and-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/allow-php-in-posts-and-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/allow-php-in-posts-and-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/allow-php-in-posts-and-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/allow-php-in-posts-and-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/allow-php-in-posts-and-pages/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [bsapaka](https://wordpress.org/support/users/bsapaka/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/troubleshoot-this-shortcode-with-variable/)
 * Status: not resolved