Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - [PHP] Asign a variable to a loop? | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
DarkSlaya
POOOOOOOOOOOORN!
Level: 88

Posts: 4139/4249
EXP: 6409254
For next: 241410

Since: 05-16-04
From: Montreal, Quebec, Canada

Since last post: 8 hours
Last activity: 5 hours
Posted on 09-28-05 02:49 AM Link | Quote
What I want to do is make a plugin for a certain Portal system.

Now, I ran into a problem:
I want to use the make table function, which look like this:
mktable($title, $content)

However, I want $content to be a loop (Because I need to grab a few rows from mySQl to put it there).


Any way to do that?
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 3921/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 09-28-05 04:22 AM Link | Quote
is there a reason why you can't do the query before you call mySQL?
DarkSlaya
POOOOOOOOOOOORN!
Level: 88

Posts: 4140/4249
EXP: 6409254
For next: 241410

Since: 05-16-04
From: Montreal, Quebec, Canada

Since last post: 8 hours
Last activity: 5 hours
Posted on 09-28-05 04:25 AM Link | Quote
I don't quite get what you're asking there
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 3924/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 09-28-05 10:43 AM Link | Quote
what do you mean by a loop? so you mean you want $content to represent a for or a while loop? so, will $content be the rows in the table? if so, why can't you do an mySQL query beforehand to get the rows that will be transformed into a table?
Mega-Dog

Level: 20

Posts: 102/139
EXP: 40051
For next: 2388

Since: 03-15-04
From: Minnesota

Since last post: 8 days
Last activity: 4 days
Posted on 09-29-05 04:52 AM Link | Quote
Originally posted by DarkSlaya
I don't quite get what you're asking there


Sounds like he is tring to put it in a loop to instert rows.
DarkSlaya
POOOOOOOOOOOORN!
Level: 88

Posts: 4142/4249
EXP: 6409254
For next: 241410

Since: 05-16-04
From: Montreal, Quebec, Canada

Since last post: 8 hours
Last activity: 5 hours
Posted on 09-29-05 06:00 AM Link | Quote
I'M trying to make a loop (in the sense of "while" or "for")

I can't do it before calling the function, because the function is what makes the formated table to display data (well, it's made so the table changes style according to layout).

If I could, I would've made that loop before, trust me.
sloat

Level: 16

Posts: 83/85
EXP: 18044
For next: 2212

Since: 05-21-04
From: South Central Delaware

Since last post: 19 days
Last activity: 5 hours
Posted on 09-29-05 08:01 AM Link | Quote
you could make a string of code and save it to a var, then use the eval function to execute it. that's about as close as you will get.
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Programming - [PHP] Asign a variable to a loop? | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.013 seconds.