![]() |
Variables in Hooks
I have a variable problem in a hook. Can anyone help with why case 2 or case 3 do not work? Thanks in advance for any replies.
Case 1 (Works fine) $test1 = "333"; build_something($test1, 0, 0) Case 2 (Does not work) $another1 is 333 when displayed in a template $test1 = $another1; build_something($test1, 0, 0) Case 3 (Does not work) $another1 is 333 when displayed in a template build_something($another1, 0, 0) |
Very difficult to say when you aren't telling us which hook location and which template. It could be the variable for the template is rendered after your plugin and so the variable isn't available at the time.
|
Quote:
It's as if this works: $test1 = "333"; build_something($test1, 0, 0) But this doesnt: $another1 = "333"; $test1 = $another1; build_something($test1, 0, 0) |
Sorry, but what is above should work. If you want us to figure out why it isn't working, you'll need to be more specific and post code, hook locations, and template stuff.
|
All times are GMT. The time now is 11:14 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:
|