The string reference variables in PHP are mainly different from the database operation strings.
1, normal string reference variable
A. The outer layer must quote double quotation marks
B. The variables in the string can be written as: $s or {$s}
2. Database operation strings (database operations directives)
A. String outer layer must use double quotation marks
B. Variables must be in curly braces {} (except when assigning string properties) such as:
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/89/47/wKioL1gOyujQVl7fAAAzlIxZyXc241.png "title=" QQ picture 20161025105611.png "alt=" Wkiol1goyujqvl7faaazlixzyxc241.png "/>" C. The type of the corresponding data attribute is required when the required variable is assigned to a database property or as a logical operation:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/49/wKiom1gOy3Oy1c37AABBkoRs94s040.jpg "title=" Qq20161025105900.jpg "alt=" wkiom1goy3oy1c37aabbkors94s040.jpg "/> The attribute title,authordid,content in the database in the preceding code is a string, So the variable is to use single quotation mark ' {$title} ' or ' $title ', the former is recommended
This article is from the "9043753" blog, please be sure to keep this source http://9053753.blog.51cto.com/9043753/1865324
Reference variable problem in PHP string