Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
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 |
| ||
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 |
| ||
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 |
| ||
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 |
| ||
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 |
| ||
Originally posted by DarkSlaya 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 |
| ||
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 |
| ||
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? | | | |