Single and double quotation mark instance usage in PHP _php tutorial

Source: Internet
Author: User
The fields inside the double quotation mark are interpreted by the compiler and then output as HTML code.

"The single quotation mark does not explain, the direct output."

Both single and double quotes have their own purpose.

The contents of single quotes are not parsed and are more efficient.

As in the following code:


$url = ' http://www.bkjia.com ';

Single quote output

$output = ' $url ';

Echo ' single quote output: '. $output. '
';

Double quote Output

$output = "$url";

echo "Double quote output:". $output;

?>

The output is as follows:

http://www.bkjia.com/PHPjc/364587.html www.bkjia.com true http://www.bkjia.com/PHPjc/364587.html techarticle The fields inside the double quotes are interpreted by the compiler and then exported as HTML code. "The single quotation mark does not explain, the direct output." Both single and double quotes have their own purpose. ...

  • 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.