PHP Array Function notes
Array_change_key_case--Returns an array with string key names all lowercase or uppercaseArray_chunk--Splitting an array into multipleArray_combine-Creates an array with the value of an array as its key name, and the value
thinkphp List_to_tree for unlimited class listing all nodes
The List_to_tree is easy to use and can be viewed in detail in the manual. Because I need to list all the nodes at the same time, so I wrote a recursive function, for everyone to refer to.
PHP Array Function notes
Array_change_key_case--Returns an array with string key names all lowercase or uppercaseArray_chunk--Splitting an array into multipleArray_combine-Creates an array with the value of an array as its key name, and the value
PHP Array Function classification
basic functions of array manipulation1, the key name and value of the arrayarray_values ($arr); Get the value of an arrayArray_keys ($arr); Gets the key name of the arrayArray_flip ($arr); the values in the array
1. Basic functions of array manipulationThe key and value of the array:Array_values ($arr); Get the value of an arrayArray_keys ($arr); Gets the key name of the arrayArray_flip ($arr); the values in the array are exchanged with the key names (if
Basic functions of array manipulationThe key name and value of the arrayArray_values ($arr); Get the value of an arrayArray_keys ($arr); Get the key name of the arrayArray_flip ($arr); The values in the array are interchanged with the key names (if
1, the classification of the collection (all located under the Java.util package)Set Frame system 1) collection is the parent class interface of the collection (except for the map collection), and the Set and list collections are inherited from
function
Description
Addcslashes ()
Returns a string that adds a backslash before the specified character.
Addslashes ()
Returns a string that adds a backslash before a predefined character.
1: Set 2 Collection (Single column collection) 3 List (ordered, repeatable) 4 ArrayList 5 The underlying data structure is an array, query fast, delete and subtract slowly 6 Thread insecure, high efficiency 7 Vector 8 The underlying data
PHP 5Array function
Introduction to PHP ArrayThe PHP array function allows you to access and manipulate the array.Supports simple arrays and multidimensional arrays.
InstallationThe PHP Array function is part of the PHP core. These
With a simple understanding of the PHP data type in the previous article, we know the string type, this article will introduce the string functions commonly used in PHP.The string is a sequence of characters, such as "Hello world!".PHP String
The comparable interface forces the overall ordering of objects that implement each of its classes. -Natural sort. The CompareTo of a class is called a natural comparison method. Public interface Comparable {public int compareTo (T o);}This
Directory
One, Collection and iterators
Second, List interface and implementation class
Third, MAP interface and implementation class
Four, Set interface and implementation class
V. Queue interface and implementation class
Untitled Document A review of string manipulation functions in PHPQueries for a string that occurs in another string $strA = "ESDNXZLKCSNKNLKFNJSERNVSZLKDFNGFLKDNLDSNALSDNAKJDNBKJBVAKKCS";$strB = ' DN ';$STC =strrpos ($strA, $strB); Strpos can be
PHP: Indicates the earliest version of PHP that supports this function. The function Description Phparray () creates an array. 3array_change_key_case () returns an array whose keys are both uppercase and lowercase. 4array_chunk () splits an
The List_to_tree is easy to use and can be viewed in detail in the manual. Because I need to list all the nodes at the same time, so I wrote a recursive function, for everyone to refer to. Public Function Index () { Load (' extend ');
*set CollectionA duplicate element collection, and contains at most one null element, this class implements the set interface, there is a hash table support, the predefined types in Java, such as String, Integer can be used within the collection,
The key name and value of the arrayArray_values ($arr); Get the value of an arrayArray_keys ($arr); Gets the key name of the arrayArray_flip ($arr); the values in the array are interchanged with the health name (if there are duplicates, the previous
The example in this article describes a simple way to implement a bubble sort in PHP. Share to everyone for your reference, specific as follows:
$files =array ("File11.txt", "File22
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.