JonZ
04-16-2009, 03:09 AM
I'm trying to generate an ID number for each 'newsbox' my script generate to make them collapsable by the user.
I use the toggle_collapse() script and it work all fine.
I generate the newsbox with a loop, and with each boxes I generate a "newsbox_".$i id tag.
When I echo the codes on my template it all working fine except I have a problem with the one that require styling using the global.php.
I try to put a style in my echo:
echo ("style=\"".$vbcollapse['collapseobj_newsbox_'.$i]."\"> ");
But obviously it doesn't work because it like trying to mix a variable name with a string, when the data needed in the $vbcollapse array is a value.
How can I generate that kind of variable name without parsing the value as a string?
I use the toggle_collapse() script and it work all fine.
I generate the newsbox with a loop, and with each boxes I generate a "newsbox_".$i id tag.
When I echo the codes on my template it all working fine except I have a problem with the one that require styling using the global.php.
I try to put a style in my echo:
echo ("style=\"".$vbcollapse['collapseobj_newsbox_'.$i]."\"> ");
But obviously it doesn't work because it like trying to mix a variable name with a string, when the data needed in the $vbcollapse array is a value.
How can I generate that kind of variable name without parsing the value as a string?