Re: Looping?
| From: | Christian Cresante | Date: | Fri, 14 Dec 2001 12:50:15 +0000 |
| Subject: | Re: Looping? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77731@lists.php.net to get a copy of this message | ||
Hello. The easiest and cleanest way to do is use
something like:
function start($times)
{
for loop
{
?> //END php tag
// Spit out the HTML.
<?php //OPEN php tag
} // close for loop
} // end function start()
It may get trickier if the HTML is dependant on some
variable in the fuction.
HTH.
--- Tony Arnold <tony.arnold@telia.com> wrote:
> Hello, I don't know if I'm in the right newsgroup
> but I'll give it a try...
> :-)
>
> How can I make the following work:
>
> function start($times)
> {
> for...loop starts here...
> { <-- notice only one bracket.
> }
>
> function end()
> {
> } <-- the ending bracket.
> }
>
> start('10');
> html-code... I want this to be repeated 10
> times.
> end();
>
> This doesn't work but this is how I want it! :-)
> Anyone?
>
> / Tony Grefweberg
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com