Please explain this syntax:

'dsn' => 'mysql:host=localhost;dbname=crm', 

I understand what it is and why, but I don’t understand how this syntax works at all. As a sign ";" , which is the line ending character here stuck in the middle of the line of code?
What does the ":" sign do in the "mysql:host" construct?
Why can not the normal:

 'host' => 'xxx'; 'dbname' => 'xxxxx'; 
  • Everything inside the quotes is a string. This line is parsed, separated by; and by:, and then they also divide by = to get the data to connect to the database. And who said that your version is normal? - fedornabilkin

0