PHP entry Variable String _php tutorial

Source: Internet
Author: User
A string is just a piece of characters enclosed in quotation marks: letters, numbers, spaces, punctuation, and so on.

All of the following are strings:

' Huige ' "in Watermelon Sugar" ' August 2, 2011 '

FAQ:

"1" When creating a string, you can enclose the character in single or double quotation marks, and 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, it can be escaped by placing a backslash before the problematic character (the character in question is a double quotation mark, and you will later learn about the other problematic character):

 
  

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

 
  

"3" If the same variable is assigned a value of 2 times (for example: $book), the new value overrides the old value.

 
  

The results are printed on their own, so that you can verify that the old values are not rewritten under the new values.

Variable printing i wrote here = = = "PHP entry variable

http://www.bkjia.com/PHPjc/743388.html www.bkjia.com true http://www.bkjia.com/PHPjc/743388.html techarticle A string is just a piece of characters enclosed in quotation marks: letters, numbers, spaces, punctuation, and so on. All of the following are strings: ' Huige ' "in Watermelon Sugar" ' Augu ...

  • Related Article

    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.