What is PDO?
There are three different "engines" PHP can use to communicate with MySQL databases.
- MYSQL - This method is deprecated and must never be used
- MySQLi - Similar to MYSQL, but newer and more powerful
- PDO - An object oriented method that is database agnostic (meaning it can be used with a variety of databases, not just MySQL)
There is syntax I do not recognize (->)
This is object oriented syntax. The PDO method requires it. Although PHP was not originally an object oriented programming language, its OO capabilities have matured and it is the preferred way to write code.