Re: [PHP Template] Re: [PHP3] Re: [PHP Template] Re: [PHP3] Re: [PHP Template] Template Discussion
[email protected] (Monte Ohrt) Wed, 22 Mar 2000 15:19:51 -0600
| Newsgroups | php.template |
|---|---|
| Organization | ispi |
| Message-ID | <[email protected]> |
I messed up the example a bit. It should read:
<? for($loop=0; $loop<=count($Name); $loop++): ?>
<? print $Name[$loop]; ?><br>
<? print $Address[$loop]; ?><br>
<? print $Phone[$loop]; ?><p>
<? endfor; ?>
Monte
John Coggeshall wrote:
>
> >{section}
> > {@Name}<br>
> > {@Address}<br>
> > {@Phone}<p>
> >{/section}
>
> or
>
> ><? for($loop=0; $loop<=count($Name); $loop++): ?>
> > <? print $Name[$loop]; ?><br>
> > <? print $Name[$loop]; ?><br>
> > <? print $Name[$loop]; ?><p>
> ><? endfor; ?>
>
> How about this...
>
> backend.php3
> -=-=-=-=-=-=-=-
> function loop($arrayvar) {
>
> for($loop = 0; $loop <= count($arrayvar); $loop++) {
>
> echo $arrayvar[$loop];
> echo $arrayvar[$loop];
> echo $arrayvar[$loop];
>
> }
>
> }
> -=-=-=-=-=-=-=-
> EOF backend.php3
>
> Then your "template"....
>
> <? loop($Name); ?>
>
> Now I'm definately not a designer... but boy that looks simple to me.
>
> John
>
> --
> PHP Template Engine Mailing List
> Current engine specification can be found at:
> http://va.php.net/~andrei/tpl-engine-spec.txt
> To unsubscribe, e-mail: [email protected]
--
Monte Ohrt [email protected] | 99 bugs in the code,
Chief Technologist ispi of Lincoln | 99 bugs, fix one bug,
voice: +1.402.441.3295 | compile it again,
http://www.ispi.net fax: +1.402.483.5418 | 101 bugs in the code...