The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to use a PHP variable in a template
Hey, I'm just starting to modify my vB setup and I've got this very basic question, which I presume will have be very easy to answer.
Say I declare a variable in my new custom PHP page like so: Code:
$myVariable = 1; |
#2
|
|||
|
|||
Try using this instead:
PHP Code:
|
#3
|
|||
|
|||
Brad, you're my knight in shining armor! =)
Just using $bbuserinfo[username] works for showing the username though, is this because it's a global variable? Great signature by the way. |
#4
|
|||
|
|||
It's just something odd I've noticed in 3.5, wrapping the var or array in the {} tend to make it show if it doesn't by itself.
|
#5
|
|||
|
|||
Heh, odd indeed. Well, I tip my hat in gratitude for you Sir and bid you a good day!
|
#6
|
||||
|
||||
im having the same problem as Borisch, but i cant make the variable to show even if i wrap it with the "{}" i dont know what im doing wrong, the variables are also pre defined text based on a if conditional
|
#7
|
|||
|
|||
Anyone? Ideas?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|