Instance 291: Create a New PHP 5.0 string

Source: Internet
Author: User

Instance 291: Create a New PHP 5.0 string

This is an instance created by a string.
Instance location: CD mingrisoft10291

Instance description

In the past, strings were created using single quotation marks or double quotation marks. In Versions later than PHP 5.0, a new string definition method was introduced, this example describes how to create a new string.
Run this instance, as shown in Figure 10.29. If "Jilin Province tomorrow technology" is printed on the page, the new string is successfully created.

Figure 10.29 create a new PHP 5.0 string

Technical Points

The key technology of this instance is how to create this new string. This string starts with "<" and is followed by the string. In this example, "mark" is used as the mark and is followed by the string content, end with a mark ("mark. The new string format is as follows:

<
     <标记
String content // equivalent to "string content"
Mark;

Implementation Process

(1) Create a New PHP 5.0 string. The Code is as follows:

     $ Str = <
     
      
Jilin tomorrow Technology
      
Strmark;
Echo $ str;
?>

(2) run the instance. If "Jilin Province tomorrow technology" is displayed in the browser, the program is successfully created.

Let alone

Based on this instance, you can:
Use a new string to create a mail header and body.
The HTML Tag is used as the string content and output without escaping.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.