Working with databases in php. PDO module
In the previous note, we familiarized ourselves with the deprecated mysql module. Here we will provide an example of working with a more modern one.
Working with databases in PHP. MySQL module
If before (before php 5.0) it was possible to use a more or less trivial way of working with databases in php (using the MySQL module), then with new versions of php it is necessary to switch to new modules, such as mysqli or pdo. The MySQL module is deprecated in php 5.5.x and will soon be completely excluded.
In this note we will remind you how to use the MySQL module, but use modern interfaces for work (see the next notes). To use the minimum functionality of the MySQL module you only need to remember a few functions (of course, there are many more of them, here only the necessary minimum is presented).
Interaction between Twig and Symfony framework. Global variables (Lesson 8.2)
We are already familiar with the twig templating engine, know how to write markup on it and include external files (assets). Now we just need to consider some aspects of interaction in Symfony framework.