Home  >  Article  >  Backend Development  >  Some ideas for systematically learning PHP

Some ideas for systematically learning PHP

不言
不言Original
2018-04-14 17:05:582638browse

This article mainly introduces some ideas for systematically learning PHP, which has certain reference value. Now I share it with everyone. Friends in need can refer to it

As a new PHPer, I am eager to If you want to improve your coding skills, there are currently few experts on the market who can point out a relatively reliable way for novices.

First of all, in the face of the many messy functions in PHP, how to sort out the relationship between them? After a period of thinking, I came up with a learning path for your reference. .

As a scripting language, PHP is the most basic CURD of data, which probably involves: 1. SQL operations of the database; 2. PHP connection operations to MYSQL;

These are very simple. Just look at the DOME and the manual and you have them all done. Next, if you think about it carefully, in fact, what PHP handles is nothing more than how to process the data according to business needs after it is taken out of the database.

I’m talking about PHP Before processing data, we have to talk about PHP's data types.

PHP data types are divided into eight types;

.Integer and floating point, Boolean, string; (basic type)

Two, Array and object; (Mixed type)

Three.null and resource type; (Special type)

Here is a comparison of the six types of JS

1. Numeric value, Boolean, string;

2 null and undefined;

3. Object;

Why should we talk about PHP data types here? Because I found that in daily operations, understanding data types plays a key role in sorting out the many functions of PHP. I didn’t want to think about these things at first.

It’s a pity that there are no existing tutorials on the market to provide ideas on how to classify the many functions in the PHP manual;

No nonsense Say, according to the data type of PHP, we can divide the functions into the following categories:

Commonly used logical functions:

1.Functions for string operations ;

II.Functions for array operations;

Commonly used file operation functions

III.Function for file upload operation;

IV.cookie andsession

. File-related functions and classes that automatically create files;

OOP encapsulation of commonly used classes

6.GD library operation;


##The naming of PHP is relatively confusing, but most of them are the functions of the corresponding module name. It's a pity that the English is too bad and I can't understand it well;

Other functions are written in a mess, and they may be eliminated functions, so I won't go into details here.

Understanding the classification of functions can help save time and avoid falling into the deep hole of PHP's function library. Then look at it. Our daily operations are nothing more than making corresponding adjustments to the display and storage of data. Operation,

The data is stored in the data table. The data is taken out from the database, usually in the form of a two-dimensional array. The most common method is to traverse a multi-dimensional array. Here you can compare the use The difference between for and foreach;

After the data is traversed, sometimes a string needs to be output, such as the implementation of the paging class in THINKPHP. The background generates a large string of strings through logical processing and inserts it into the front desk. In the template;

When programming, the PHP language is used to control and logically process the data flow. Generally, during debugging, this process is followed for corresponding debugging.

The second step is to design the database and understand some ideas in ORM.

Related recommendations:

How to learn php experience sharing


##

The above is the detailed content of Some ideas for systematically learning PHP. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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