PHP basic tutorial notes, PHP basic tutorial_PHP tutorial

WBOY
Release: 2016-07-13 09:45:27
Original
871 people have browsed it

php basic tutorial notes, php basic tutorial

I have known php for a long time, but I have never had time to learn it. Now I have to learn php carefully, hoping to one day be freed from the cumbersomeness of c# Come out and move towards the simplicity and clarity of PHP. The huge development environment alone is enough trouble for me. I have to install vs and sql every time I install it.

Setting up the PHP environment is very simple, because I took a shortcut and downloaded wamp service 2.5 online. The official website is http://www.wampserver.com/. There are 32-bit and 64-bit versions. The download must be consistent with the system. version, otherwise strange errors will appear, which delayed me for a long time.

Of course you need books to learn a language. I found an electronic version of PHP Basic Tutorial 4 on the Internet, which is very suitable for PHP novices to learn. The following are my study notes. Record them for future reference. It is also a reminder for myself.

1. Several ways to output hello world

<?php echo "hello world!";
Copy after login
print "hello world!";
Copy after login
print_r("hello world!");
Copy after login
eval("echo \"hello world\";")<br />?>
Copy after login

echo can output multiple values ​​at one time. echo is a language construct, not a real function.

print() only applies to scalar types such as numbers and strings. If the string is successfully displayed, it returns true, otherwise it returns false.

print_r() can simply print out strings and numbers, while arrays are displayed as a bracketed list of keys and values, starting with Array.

The eval() function will execute the php code in the string.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1042017.htmlTechArticlephp basic tutorial notes, php basic tutorial I have known php for a long time, but I have never had time to learn it, so I have to start learning it now Learning PHP, I hope one day to be freed from the cumbersomeness of C# and move towards PHP...
Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template