php - Simple Template Conversion -


to organisation , structure of project, adopt kind of template technique.

i have looked on quite few examples, , use php convert place holders in template, actual content.

the issue have, happens when wish loop through information retrieved database, or if want display things on page if conditions met (if statements)?

i’m still toying idea if way go, , consider views may have.

try taking @ page, makes neat php including (so say) in html templates.

http://php.net/manual/en/control-structures.alternative-syntax.php

for instance:

<ul> <?php foreach ($list $item): ?>  <li><?=$item?></li> <?php endforeach; ?> </ul> 

if not mean, please elaborate.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -