Welcome to Geeklog, Anonymous Monday, December 30 2024 @ 12:04 pm EST
Geeklog Forums
static page array display.
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
We never stop looking... ...for a better way
We never stop looking... ...for a better way
11
13
Quote
Status: offline
Tymz79
Forum User
Junior
Registered: 07/23/03
Posts: 15
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.
15
9
Quote
Status: offline
watcorp
Forum User
Junior
Registered: 09/03/02
Posts: 23
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
We never stop looking... ...for a better way
$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
We never stop looking... ...for a better way
11
26
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
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.
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
11
15
Quote
All times are EST. The time is now 12:04 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content