Categories
What are those brackets for?
Tell me what {} are for, for example like this
$x = "Что то"; "CREATE TABLE {$x} (id int not null auto_increment primary key, name text)";
Answer the question
In order to leave comments, you need to log in
The brackets show the bounds of the interpolated variable. In this case, they can be omitted.
<?php $a = 'A'; $abc = 'ABC'; echo "$abc"; // ABC echo "{$a}bc"; // Abc echo "{$abc}"; // ABC
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question