Home > Backend Development > PHP Tutorial > New contact with this ape (includes PHP development environment and PHP simple algorithm questions) - the first half of 2015.07, the first half of 2015.07_PHP tutorial

New contact with this ape (includes PHP development environment and PHP simple algorithm questions) - the first half of 2015.07, the first half of 2015.07_PHP tutorial

WBOY
Release: 2016-07-13 09:46:54
Original
969 people have browsed it

New contact with this ape (includes PHP development environment and PHP simple algorithm questions) - the first half of 2015.07, the first half of 2015.07

PHP&MYSQL

Development environment preparation

SAE http://sae.sina.com.cn/

GitHub https://github.com/

Git http://git-scm.com/

Code Deployment Manual http://sae.sina.com.cn/doc/tutorial/code-deploy.html

bootstrap.css http://cdn.bootcss.com/bootstrap/3.3.4/css/bootstrap.css

Bootstrap front-end development framework http://v3.bootcss.com/

xampp https://www.apachefriends.org/zh_cn/index.html (recommended)

Development Tools

atom https://atom.io/ (myself)

sublime test3 http://www.sublimetext.com/3 (recommended)

notepad https://notepad-plus-plus.org/

phpstorm http://www.jetbrains.com/phpstorm/

Developer Community

Blog Park http://www.cnblogs.com/ (for my own use)

CSDN http://www.csdn.net/

51cto http://blog.51cto.com/

Open Source China http://www.oschina.net/

Lahuo·Entrepreneurship

Witkey-Zhubajie.com http://www.zbj.com/

36氪 http://36kr.com/

Huxiu.com http://www.huxiu.com/

PHP algorithm questions to be in-depth (code added after implementation...)

Only print 0

The specific number is determined by the input parameter n

If n=5, print 00000

New contact with this ape (includes PHP development environment and PHP simple algorithm questions) - the first half of 2015.07, the first half of 2015.07_PHP tutorialphp $n = $_GET['n']; for ($i=0; $i < $n; $i ) { echo"0"; } ?> //Modify n in the browser address input field: eg: //……?n=8 Print n zeros based on n value

Print a line 0101010101010101010101

The specific number is determined by the input parameter n

For example, test.php?n=3 prints 010

Achieve 1 00 111 0000 11111

 for if implementation

New contact with this ape (includes PHP development environment and PHP simple algorithm questions) - the first half of 2015.07, the first half of 2015.07_PHP tutorialphp for ($i = 0; $i < 10; $i ) { for ($j = 0; $j <= $i; $j ) { if ($i % 2 == 0) { echo '0'; } else { echo '1'; } } echo '
'; } ?> implementation of for&if statement

 for switch implementation

 while if implementation

While switch implementation

New contact with this ape (includes PHP development environment and PHP simple algorithm questions) - the first half of 2015.07, the first half of 2015.07_PHP tutorialphp $i = 0; while ($i < 10) { $j = 0; while ($j <= $i) { switch ($i % 2) { case 0: echo '0'; break; case 1; echo '1'; break; } $j ; } echo '
'; $i ; } ?> While&switch statement implementation

Be a calculator

For example, test.php?a=1&b=2&operator=jia output 3

For example, test.php?a=5&b=2&operator=jian outputs 3

For example, test.php?a=2&b=5&operator=cheng outputs 10

For example, test.php?a=6&b=3&operator=chu output 2

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1029946.htmlTechArticleNew contact with this ape (includes PHP development environment and PHP simple algorithm questions) - first half of 2015.07, upper of 2015.07 Half-month PHPMYSQL development environment preparation SAEhttp://sae.sina.com.cn/ GitHubhttps://github...
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