I think i don`t need to explain what is “Template Engine”, if this is the first time you hear about it
look at this link (Wikipedia)
Here is a list of some PHP Template Engines:
Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. This implies that PHP code is application logic, and is separated from the presentation.

This parser has been developed 5 years ago with the aim to produce a tool that allows to separate code from HTML. It started out as a simple php function. Meanwhile it has been rewritten by Stefan Reich and turned into a class file.
In larger projects there are usually designers and developers involved.

XTemplate allows you to store your HTML code separately from your PHP code (as opposed to compiling your template into PHP as per Smarty etc.). It has many useful features such as nested blocks and various kinds of variable interpolation, and yet the code is very short and very optimized.
Layout Solution is a set of open source PHP classes to simplify website development and maintenance. It holds commonly used variables and page elements, allowing you to focus on designing your pages rather than worrying about correctly duplicating common layouts over and over.
Dwoo is a PHP5 template engine which is (almost) fully compatible with Smarty templates and plugins, but is written from scratch for PHP5, and adds many features.
Open Power Template is a template engine for PHP5. Its task is to produce a full HTML code from the script data and ”code templates” that show, how and where put them. OPT has many features not only for programmers, but also for template writers that make this process nice and easy.
Share on Facebook
Anonymous functions now available from PHP 5.3
Anonymous functions, also known as closures, allow the creation of functions which have no specified name. They are most useful as the value of callback parameters, but they have many other uses.
Example:
2
3
4
{
echo "My name is $name";
};
Or you can use it as callback like javascript
2
3
4
5
6
7
8
9
10
11
12
"first_name" => "Garry",
"last_name" => "Lachman",
"age" => "27"
);
$callback_function = function ($field, $field_value)
{
echo "$field = $field_value";
};
array_walk($arr, $callback_function);
Using variables out function scope
2
3
4
5
6
7
8
9
10
11
12
13
14
$arr = array(
"first_name" => "Garry",
"last_name" => "Lachman",
"age" => "27"
);
$callback_function = function ($field, $field_value) use ($prefix)
{
echo "$prefix $field = $field_value";
};
array_walk($arr, $callback_function);
Have fun boys & girls