Php entry variable string, php entry variable _ PHP Tutorial

Source: Internet
Author: User
Php entry variable string, php entry variable. Php entry variable string. The php entry variable string is only a string of characters enclosed by quotation marks: letters, numbers, spaces, punctuation marks, and so on. All the strings listed below are strings of php entry variables and php entry variables.

A string is only a string of characters enclosed in quotation marks: letters, numbers, spaces, punctuation marks, and so on.

All the strings listed below are strings:

?
1234 'Huige'"In watermelon sugar" '100' 'August 2, 2011'

FAQ:

[1] When creating a string, you can use single or double quotation marks to encapsulate characters. In addition, you must use the same type of quotation marks at the beginning and end of the character.

[2] If the same quotation marks appear in the middle of the string, you can use the problematic characters (the problematic character here is double quotation marks, and other problematic characters will be known later) put a backslash before it and escape it:

?
123 $var = "Define \"platitude\", please.";?>

Another way is to use single quotes (this way is to use single quotes when printing double quotes, and vice versa ):

?
123 $var = 'Define "platitude", please.'; ?>

[3] If the same variable is assigned twice (for example, $ book), the new value will overwrite the old value.

?
1234 $book = 'High Fidelity'; $book = 'The Corrections'; ?>

The result is printed by yourself, so that you can verify whether the new value overwrites the old value.

The delimiter string is only a string of characters enclosed in quotation marks: letters, numbers, spaces, punctuation marks, and so on. All the strings listed below are strings...

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.