How to Understand PHP is mainly a language for operating arrays, or how to properly use arrays? How to Understand PHP is mainly a language for operating arrays, or how to properly use arrays?
Reply content:
How to Understand PHP is mainly a language for operating arrays, or how to properly use arrays?
A dedicated data structure solution is available in strong programming languages. Generally, a container is created to store any type of data in the container, and the container capacity can be determined based on the data stored in the container, hitting the variable-length container structure, for example, linked lists, stacks, and queues are common forms in data structures.In PHP, arrays are usually used to complete the work that can be completed only when data structures are used in other languages.
The Lord, who told you that PHP is the main language used to operate arrays, PHP cannot do anything without leaving the database, and those who mislead you are hateful.
The author's question is a misunderstanding. I don't think PHP is "mainly a language for operating arrays"
1. The cause of this misunderstanding may be that the PHP array can be summarized as a key-Value Pair array. Unlike other languages, you need to distinguish between linked lists, dictionaries, and index arrays.
2. If "mainly a language for operating arrays" is set up, other languages are also set up. In addition to Operation arrays, they also operate on strings and operations.
3. In my opinion, whether in PHP or other languages, it must beData Structure+AlgorithmLanguage. Therefore, we use arrays to describe the data structure, object-oriented to describe the data structure, or strings (such as json and xml) to describe the data structure. Yes.
This may be an alternative to PHP's powerful array functions.
Every language has the concept of an array. How can we say that php is a language mainly used to operate arrays? It can only be said that the array is flexible and powerful, and it is only one of the php data types. Python also has its list, ancestor, and dictionary.
The php array is very powerful, but it seems a bit...
The PHP array makes it easy for us to Reasonably organize the data structure. PHP can do a lot of things. You can look at the swoole PHP extension.