Re: [PHP-WIN] Need help with variables - SOLVED!

2001-06-27 Thread Michel Laine
This is the code snippet from my original message: > > // 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 ); > > } > > // D

Re[2]: [PHP-WIN] Need help with variables

2001-06-27 Thread Ruslan Ohitin
Hello Michel, I send you example that works with PHPLib template. This is a method I use in my scripts. Hope it helps you. ML> Ruslan Ohitin wrote: >> Hello Michel, >> >> You mixing php variables and Template variables. They are from >> different "namespaces". set_var() takes associative array

Re: [PHP-WIN] Need help with variables

2001-06-26 Thread Michel Laine
Ruslan Ohitin wrote: > Hello Michel, > > You mixing php variables and Template variables. They are from > different "namespaces". set_var() takes associative array with string > keys - Template var names. Edit one line of your code: > > ML> $var = ${"DAY".$j}; > $var = "DAY" . $j; // $var is

Re: [PHP-WIN] Need help with variables

2001-06-26 Thread Ruslan Ohitin
Hello Michel, You mixing php variables and Template variables. They are from different "namespaces". set_var() takes associative array with string keys - Template var names. Edit one line of your code: ML> $var = ${"DAY".$j}; $var = "DAY" . $j; // $var is a string "DAYn" -- Best regards,

[PHP-WIN] Need help with variables

2001-06-25 Thread Michel Laine
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