Re: [PHP3] Re: [PHP Template] Re: [PHP3] Re: [PHP Template] Template Discussion

[email protected] (Andrei Zmievski) Wed, 22 Mar 2000 15:13:14 -0600
Newsgroups php.template
Message-ID <[email protected]>
On Wed, 22 Mar 2000, John Coggeshall wrote:
> 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.

I don't think that's going to be of much use. What if the designer wants
to put each loop iteration in a table row? Alternate the background
colors on each row? Bold it? Italicize it? You would have to modify
backend.php3 - and lose the separation of form and content.

Maybe I should have called it Layout Language, instead of Template
Engine. People seem to have a really wide-ranging view of templates.

-Andrei

When we eliminate the impossible, whatever remains,
however improbable, must be true. -- Sherlock Holmes