Title: Testing a variable?
Last modified: November 2, 2020

---

# Testing a variable?

 *  [iantresman](https://wordpress.org/support/users/iantresman/)
 * (@iantresman)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/testing-a-variable/)
 * Can I test a variable? The following is supposed to display the number 1-4, and
   whether it is greater than 2 or noṭ
 * Trial 1
 *     ```
       [pass list=1~4]
         [set x]{ITEM}[/set]
         <li>[get x]  [if {x}>2 ]True[else]False[/if]
       [/pass]
       ```
   
 * Trial 2
 *     ```
       [pass list=1~4]
         [set x]{ITEM}[/set]
         <li>{ITEM}  [if {ITEM}>2 ]True[else]False[/if]
       [/pass]
       ```
   
    -  This topic was modified 5 years, 7 months ago by [iantresman](https://wordpress.org/support/users/iantresman/).

The topic ‘Testing a variable?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/custom-content-shortcode_766976.svg)
 * [Custom Content Shortcode](https://wordpress.org/plugins/custom-content-shortcode/)
 * [Support Threads](https://wordpress.org/support/plugin/custom-content-shortcode/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-content-shortcode/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-content-shortcode/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-content-shortcode/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [iantresman](https://wordpress.org/support/users/iantresman/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/testing-a-variable/)
 * Status: not resolved