PHP Basic Tutorial Notes

Source: Internet
Author: User
A long time to know the PHP, but has not been to study, and now began to learn PHP, hope that one day from the Red C # of the cumbersome release, to PHP concise and clear. A large development environment is enough for my trouble, every time the installation must be installed Vs,sql.

PHP environment is very simple to build, because I took a shortcut, online download WAMP5, is windows+apache+mysql+php, installation completed Php,apache,mysql installed, accidentally made a mistake, 64-bit window must be installed with the corresponding 64-bit version, otherwise there will be a strange error!

Learn the language of course need books, online find an electronic version of PHP Basic Tutorial 4, very suitable for PHP novice learning, the following is my study notes, recorded for later to see, but also to their own supervision.

First, Hello World

Several ways to implement the output Hello World

print "Hello world!";

Print_r ("Hello world!");

eval ("Echo \" Hello world\ ";")
?>

Note: Echo can output multiple values at once, with multiple values separated by commas. Echo is a language structure (language construct), not a real function and therefore cannot be used as part of an expression.
The print () function prints a value (its arguments) and returns True if the string is displayed successfully, otherwise false.
Print_r () can simply print the string and the number, and the array is displayed with the enclosed key and the list of merit, beginning with an array. However, the result of Print_r () output Boolean and null is meaningless because it is all printed "\ n". Therefore, using the Var_dump () function is more suitable for debugging.

The eval () function executes the PHP code in the string.

The above describes the basic PHP tutorial notes, including aspects of the content, I hope the PHP tutorial interested in a friend to help.

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