Can’t manipulate php variable with Airpress values
-
So I’m trying to assign and manipulate a php variable using Airpress shortcode, I’d be willing to using the manual requests as easily as the shortcodes.
I’ve done some testing and when I assign a PHP variable with a shortcodes value like so:
$x = array(‘[apr field=”count”]’);
variable $x can output the correct info with echo and gettype() says that it is a string.
If I try to do anything to $x that I can do to a manually assigned string variable it does not work the right way. When using an IF statement the $x variable does not compare properly to either the int number that is assigned or a string of the same number. RegEx does not function on it properly. Normally you can convert a number set as a string to an Integer or Float value. If I try to do that I just get a 0.
At this point I have no idea what is going on with this variable. I’ve put several hours into it because of the mystery and I can’t figure out what’s happening.
Any thoughts? Should I do this a different way?
- The topic ‘Can’t manipulate php variable with Airpress values’ is closed to new replies.