Home  >  Article  >  Backend Development  >  Example 291: Create a new type of string in PHP 5.0_PHP Tutorial

Example 291: Create a new type of string in PHP 5.0_PHP Tutorial

WBOY
WBOYOriginal
2016-07-15 13:24:15920browse

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>?>  


(2) Run this example. If "Jilin Province Tomorrow Technology" is displayed in the browser, the program is created successfully.

Draw inferences from one example

According to this example, readers can:

Create email headers and email bodies using new strings http://www.bkjia.com/PHPjc/446775.htmlwww.bkjia.comtrue
http: //www.bkjia.com/PHPjc/446775.html
TechArticle
Example 291: Create a new type of string in PHP 5.0 This is an example of string creation. Example location: CD mingrisoft10291 Example description In the past, strings were defined by using single quotes...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn