July 30, 2017Twig is a template engine for PHP. But isn’t PHP itself a template engine?
Yes and no!
Even though PHP started as a template engine, it didn’t evolve like one, and while we can still use it as one please tell me which version of “Hello world” you prefer:
<?php echo "<p> Hello " . $na...
April 22, 2017It’s time for our monthly hunt for new open source libraries to use and contribute to!
If you’re new to Sourcehunt, it’s our monthly post for promoting open source projects that seem interesting or promising and could use help in terms of Github stars or pull requests.
It’s our way of giving bac...
August 15, 2016In MVC based architectures, working with template engines is an inevitable part of the development routine. It usually goes like this: we prepare and pass the data to the view. In the view, we print them based on our layout design.Here is a basic example of how it works using Twig.
<?php// Twig initialization...
December 16, 2015If there is one thing the world needs, it’s definitely another PHP template engine! But wait, this one is different!
Many PHP template engines (Smarty, Blade, Twig…) are little more than abstracted PHP code, making it easier to write loops, if/then/else blocks, and display variables with less verbosity than vanilla...
Recent Comments