|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
How Do I Insert "for" Loop In Class Module?
Below are three scripts that create one page. The "TopNewsPageTwo.php" script creates an instance, the "HtmlTemplateClass.php" is the class used with the instance script, and the "TopNewsTemplateP2.php" template below displays the output in the browser.
My problem is this: How do I insert a "for" loop so that the output will display on the page (see "TopNewsTemplateP2.php" below for the desired positioning)? The "for" loop that I'm needing to incorporate into the process is as follows: $TextBoxes = "$Paragraphs"; for($i=1; $i<=$TextBoxes; $i++) { echo "<textarea rows=\"3\" cols=\"40\" name=\"Textfield\"" . "[$i]" ."></textarea><p>" . "\n"; } What I would like to do is somehow incorporate the "for" loop in the "HtmlTemplateClass.php" class module, if possible, so that I may separate the PHP code from the HTML code. Does anyone have any suggestions about how I might accomplish my task? PHP Code:
Thanks. Volitics
__________________
Thomas Jefferson: "Democracy will work only until the political incumbents discover they can perpetuate themselves in office by taxing the industrious to bribe the indolent." |
|
#2
|
|||
|
|||
|
In TopNewsPageTwo.php:
PHP Code:
__________________
__________________________________________________ _ Wil Moore III, MCP | Integrations Specialist | Senior Consultant Are You Listed...? | DigitallySmooth Inc. |
|
#3
|
|||
|
|||
|
laidbak;
Thank you for your kind help. I've got to go to work today but will give it a try this evening. Thanks again. Volitics |
|
#4
|
|||
|
|||
|
laidbak;
It works great! I appreciate the help. Best Regards; Volitics |
|
#5
|
|||
|
|||
|
No problem. Glad it worked.
![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > How Do I Insert "for" Loop In Class Module? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|