The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
$bbuserinfo[usergroupid] vs. $bbuserinfo['usergroupid']
Is there a difference? My meager PHP knowledge would assume they are both the same .
|
#2
|
||||
|
||||
I have found both being used in PHP files, but only $bbuserinfo[usergroupid] being used within the templates. I believe they work almost the same, but don't quote me.
|
#3
|
||||
|
||||
You got some reading to do.
Why is $foo[bar] wrong? Velocd: It is right in templates, because templates are evaluated as strings, and you can't use $foo['bar'] in strings (unless you surround it with { and }, i.e {$foo['bar']}). Constants are also not parsed inside strings, so even if they make bar a constant (for the sole purpose of killing time), "$foo[bar]" will work just fine. |
#4
|
||||
|
||||
Hehe... thanks .
I learned to do $foo["bar"] and use {foo["bar"]} within strings from my PHP book, but then I noticed that it's sometimes used with just $foo[bar] in the vbulletin source code. Well, now I know . |
#5
|
||||
|
||||
vB3 should have $foo['bar'] instead of $foo[bar], except for templates.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|