Example 291: Create a new type of string in PHP 5.0
This is an example of string creation
Instance location: CD mingrisoft10291
Example
In the past, strings were defined by enclosing them in single quotes or double quotes to create them. In versions after PHP 5.0, a new type of string has appeared definition method, this example mainly introduces how to create this new type of string.
Run this example, as shown in Figure 10.29. If "Jilin Province Tomorrow Technology" is printed on the page, it means that the new string is created successfully.
图10.29 创建PHP 5.0新型字符串 |
Technical Points
The key technology in this example is how to create this new type of string. This kind of string is implemented as "
字符串内容 //相当于"字符串内容"<br>标记;
(1) Create a new PHP 5.0 string. The code is as follows:
<?php <br>$str=吉林省明日科技<br>strmark;<br>echo $str;<br>?> Copy after login |
(2) Run this example. If "Jilin Province Tomorrow Technology" is displayed in the browser, the program is created successfully.
According to this example, readers can:
http: //www.bkjia.com/PHPjc/446775.html