Re: [PHP3] Re: [PHP Template] Re: [PHP3] Re: [PHP Template] Template Discussion
[email protected] (Anne Holz) Wed, 22 Mar 2000 15:22:48 -0600
| Newsgroups | php.template |
|---|---|
| Organization | ispi |
| Message-ID | <[email protected]> |
This one is obvious to me just by looking at it. Plus, there's not much
chance of me doing something to screw it up.
{section}
{@Name}<br>
{@Address}<br>
{@Phone}<p>
{/section}
Now this one, is an open invitation for trouble. Once you start adding
;, +, $,=, <,( and a space here but not there, the designer is afraid
they will break it just by looking at it, let alone trying to add html
around and inside of it.
function loop($arrayvar) {
for($loop = 0; $loop <= count($arrayvar); $loop++) {
echo $arrayvar[$loop];
echo $arrayvar[$loop];
echo $arrayvar[$loop];
}
}
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
--
Anne Holz | [email protected]
art director | ispi
| voice: +1.402.441.3295
http://www.ispi.net | fax: +1.402.483.5418