Separate HTML from the PHP code

Pierre GIRAUD bluecarto at GMAIL.COM
Thu May 19 09:22:49 EDT 2005


You'll have to use what is called "templates".
To be simple, a template is a HTML like file in which some variable
parts are parsed by a php code.

Smarty, phpLib or EasyTemplate (http://et.geomaticien.com/) are some
template engines.
You'll find more information and examples on each documentation.

The best reason to use templates (seperate HTML from the php code) is
to get the design and the programming code well seperated. That way
you will easily be able to confide the look of your website to a
designer that don't understand anything to php coding.

Regards

Pierre GIRAUD

On 5/19/05, Philippe Gondek <philippe.gondek at gmail.com> wrote:
> Hi list,
> 
> I have made any tests with PHP/Mapscript, and I want now to begin with
> a good base. I read it's better to separate HTML from the PHP code.
> But I don't know how.
> 
> Must I have the fucntion in my .php file and call this fucntion in my
> .phtml file with the tags <? ?>    ???
> 
> Can I have a little example with one function...
> 
> Thank you...
>



More information about the mapserver-users mailing list