The previous article introduced to you "How should we use multiple nesting of if statements in PHP process control? ? ?》, this article continues to introduce you to strings in PHP:
In the previous articles, we also mentioned related issues such as strings in PHP , in the next few days we will continue to explain in depth some other issues about strings: First, we will divide it into three parts to learn about PHP strings from the beginning:
Introduction to strings
Use of string
Use of string function library
1: PHP string Introduction
String is one of the important data types in PHP and is one of the scalar types;
A string is a series of characters, each character is a byte;
The string needs to be defined in single quotes, double quotes, and delimiters
(single quotes)The code demonstration is as follows:
The demonstration results are as follows:
(Double quotes)The code demonstration is as follows:
"; echo "落花人独立,微雨燕双飞,{$poem}"; //可以用花括号{}括一个变量,就可以将变量分离出来解析,{}两边不要有空格 ?>
The demonstration results are as follows:
Recommended learning: "PHP Video Tutorial》
The above is the detailed content of PHP learning: in-depth understanding of strings. For more information, please follow other related articles on the PHP Chinese website!