![]() |
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; |
Try using this instead:
PHP Code:
|
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. |
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.
|
Heh, odd indeed. Well, I tip my hat in gratitude for you Sir and bid you a good day!
|
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
|
Anyone? Ideas?
|
All times are GMT. The time now is 07:54 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|