Posted on: 08/13/03 12:43pm
By: watcorp
We have looked at a couple of ways of looping through a mysql table with the new static page plugin (1.3..) and have not gotten any of the do while or for statements to work.....any one have any success with this yet....Thanks ahead of time
Re:static page array display.
Posted on: 08/13/03 06:23pm
By: Tymz79
I have gotten all php to work on static pages, including loops, arrays, function calls, etc. The only thing that does not seem to work about the new plug-in features is when both php is turned on and the page is set as a block within a topic, you get nothing to appear from that static page.
Anyone else encounter this? I haven\'t checked the site for any info about this yet, only because it\'s low priority for me right now.
Re:static page array display.
Posted on: 08/13/03 09:50pm
By: watcorp
We were unaware that a single variable can be exposed and evaluated on a static page. With that in mind....all php seems to work when out put is passed to a single variable that is utilized for out put at the end of parsing.....for example (the var1 variable will display with a get method form action)
$i = 0;
$j = "<br>";
while ($i < 10) {
$j .= "$i <br>";
$i++;
}
$i++;
return "$i <hr>and var1 is $var1 <hr> $j";
----------------------------------this code returns a static page
11
--------------------------------------------------------------------------------
and var1 is
--------------------------------------------------------------------------------
0
1
2
3
4
5
6
7
8
9
Re:static page array display.
Posted on: 08/14/03 05:27am
By: Dirk
[QUOTE BY= Tymz79]The only thing that does not seem to work about the new plug-in features is when both php is turned on and the page is set as a block within a topic, you get nothing to appear from that static page.[/QUOTE]
Works for me ... Can you give some more details? Did you test it with a trivial piece of PHP (to rule out any problems with the PHP code)?
bye, Dirk