mrherman Posted August 21, 2010 Share Posted August 21, 2010 Found this on Snipplr the other day. It looked interesting and was under the heading of "sticky nav." <?php if ( $[[variable]] == '[[value]]' ) { echo 'class="act"' ; } ?> Could someone explain this? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/211367-what-does-variable-mean/ Share on other sites More sharing options...
PFMaBiSmAd Posted August 21, 2010 Share Posted August 21, 2010 It's invalid when treated as php code. It's more likely that it is something out of a template system. A few lines of code, out of context, is generally meaningless. What script is this part of and what is the code surrounding it doing? Quote Link to comment https://forums.phpfreaks.com/topic/211367-what-does-variable-mean/#findComment-1102076 Share on other sites More sharing options...
mrherman Posted August 21, 2010 Author Share Posted August 21, 2010 OK, thanks very much. That is all I know--no contextual code was given. I was thinking that perhaps the '$[[variable]]' was, by itself, a PHP structure. Will mark as solved. Quote Link to comment https://forums.phpfreaks.com/topic/211367-what-does-variable-mean/#findComment-1102083 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.