I am trying to assign a bunch of strings to some Template variables
where:
I have an array $day[n] where n is 0-34 and contain strings.
I have Template variables named "DAYn", where n is a number 1-35.
The template parsing is up and running, so i have left that part out.
// Do it!
for ($i = 0; $i <= 34; $i++) {
// Need help with this part
$j = $i + 1;
$var = ${"DAY".$j};
$val = $day[$i];
// Set PHPLIB Template variable
$t->set_var( $var => $val );
}
// Do the rest (like parse templates)
I have tried so many different combinations that i don't remember them
all - The one above being the most recent.
Not that it worked any better than any of the other ones...
I have read Variable variables in the online manual.
If that was on the right track - it must mean that i am just too stupid
to get it right.
Please help!
--
Michel Laine
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]