The difference between single and double quotation marks in PHP. 1. define a string in PHP. The definition of a string can be single quotation marks or double quotation marks. However, the same single or double quotation marks must be used to define
1. Define a string
In PHP, you can use single quotes or double quotes to define strings. However, the same single or double quotation marks must be used to define strings. For example, 'hello' and 'hello' are invalid strings.When defining a
Reading a lot of code sometimes uses single quotes or double quotes to implement content containing strings. In fact, variables in double quotes can be parsed simply. single quotes are absolute strings.
1. define a string
In PHP, you can use
50 useful PHP tools and 50 useful PHP toolsPHP is one of the most widely used open-source server scripting languages. Of course, PHP is not the fastest, but it is the most commonly used scripting language. There are 50 useful PHP tools, which can
PHP Function Index 967 functions
A total of 967 functions
Abs: Get absolute value.
Acos: Gets the inverse cosine value.
Ada_afetch: Gets the return column of the database.
Ada_autocommit: Switch automatic change function.
Ada_close: Close Adabas D
Found a PHP used to determine whether a string is the return value of the bun string and the method Strpos quite weird.Look at the following statement:echo "A1:". (Strpos ("CSD", "C")). " "; 0echo "A2:". (Strpos ("CSD", "C") >=0). " "; 1echo "B1:
As a result of the recent write PHP more, occasionally hand mistakenly write a semicolon and so on grammatical errors unavoidably, the general check way is to return to the command line to run Php-l, or upgrade the direct in vim run:!php-l%, or
As mentioned above, it is very convenient to submit the form information in PHP. But how long is the lifecycle of the variable in the submitted form information? This article will talk about this issue. The form parameters are passed to the next
File: deal. php
Echo "your username is: $ uname ";
?> The above program requires the user to enter a user name, submit the form, and then return to the user name to confirm the information. It can be seen that the uname in the form has become the $
1. The first PHP Program
2. PHP supports eight basic data types, including four scalar types: boolean, integer, float, and string ), two composite types: array and object. Two special types are available: resource and NULL)
3. The var_dump
1. Separate from HTML
Any content except the start and end tags will be ignored by the PHP parser, which allows the PHP file to have mixed content. PHP can be embedded into HTML documents, as shown in the following example.
This is going to be
Vim is a text editor developed from vi. Code completion, compilation, error jump, and other convenient programming functions are particularly rich and widely used by programmers. It is used in parallel with Emacs to become your favorite editor for
To gain an in-depth understanding of PHP and make it easier to use PHP, This section describes the basic syntax of PHP. 1. Separating PHP scripts from HTML is caused by a pair of special tags in the file. When the interpreter analyzes a file, all
I have introduced the basic HTML syntax in the article about HTML syntax. A static web page can be compiled, and dynamic interaction information is very important. For example, the Membership registration and logon of some websites require the
When I first came into contact with PHP, I wanted to use PHP to print the first line of the long-time multiplication table, as shown below: {code ...} the browser reports an error and prompts a syntax error. If I put 1 * $ I in a variable and splice
Author: Hua honglangBody:I have introduced the basic HTML syntax in the article about HTML syntax. A static web page can be compiled, and dynamic interaction information is very important. For example, the Membership registration and logon of some
$ Template & amp; lt; XML & amp; lt; xml & amp; gt; {code ...} & amp; lt; xml & amp; gt; XML; can be explained to me, here & amp; lt; what does XML mean? $ Template =
%s
%s
# # 1.
Let's start with a php5.3+ grammar sugar, which we usually write about:
$a = 0;
$b = $a? $a: 1;
Syntax sugar can be written like this:
$a = 0;
$b = $a?: 1;
Execution results $b = 1, the latter is more concise, but usually not too much
PHP data type (It is a weakly typed language)Integer, floating-point, Boolean, String, array, object, NULL type, resource-typeScalar type: integer, Float, Boolean, and String type! The so-called scalar types, in essence, can only store the type of
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.