The problem of reference variables in PHP strings
String reference variables in php are mainly different database operation strings.
1, normal string reference variable
a. The outer layer must quote double quotation marks
b. Variables in a string can be written as: $s or {$s}
two。 Database operation string (database operation instruction)
a. Double quotes must be used in the outer layer of a string
b. Variables must use curly braces {} (except when assigning string attributes), such as:
`c. When a variable is required to be assigned to a database property or to perform a logical operation, the type of the corresponding data attribute is required, such as
The attribute title,authordid,content in the database in the above code is a string, so the variable should be in single quotation marks'{$title}'or'$title',.