In this course, I'll introduce you to the Twig template engine for PHP. Follow along as I explore its easy-to-learn syntax and show you how to inherit templates and create content blocks.
[SOUND] One of the worst decisions you can make is embedding HTML in your PHP code. Because someday in the future you're going to have to change it and it will not be fun. Now if you're using a fully fledged framework like Laravel, you don't really have to worry about that. But if you don't, then you need a template engine. Hi, my name is Jeremy McPeak and over the next few minutes I'm going to introduce you to Twig, the flexible, fast and secure template engine for PHP. Twig makes it easy to build and use templates within your PHP application. Thanks to its concise and template-oriented syntax, it supports everything you need to build powerful templates with ease. Things like multiple inheritance, content blocks, automatic output escaping and so much more. Come spend the next few minutes with me and we'll take a look at some of these features together.