Collection FrameCollection:|--list are ordered and repeatable, indexed, in the same order as they are taken out. |--arraylist--array structure, fast query speed, different steps |--linkedlist--chain list structure, adding and deleting speed,
PHP Tutorial Lists all subfolders and file instances in the specified directory
function Listdirfiles ()
{
Set Directory
$dirs = './';
Declaring a folder array with an array of files$aFolders = Array ();$aFiles = Array ();
$ocfolder = Opendir
Array_change_key_case-returns an array of string key names that are all lowercase or uppercaseArray_chunk-splits an array into multipleArray_column-returns a column specified in the arrayArray_combine-creates an array with the value of an array as
1 Find the character position function:
Strpos ($str, Search,[int]): Find the first position of search in $str starting with int;
Stripos ($str, search,[int]): function returns the position of the first occurrence of a string in another string. This
Math function:
10 of the more commonly used red.
abs-Absolute Valueacos-Inverse cosineacosh-Inverse hyperbolic cosineasin-anyway Chordasinh-Inverse hyperbolic sineatan2-two parameters of the inverse tangentatan-anyway cutatanh-Inverse hyperbolic
Array ("Key" = "value");
Display array
Print_r ($array);
Use the compact () function to create a new array and take the parameters as a unit of the new array;
$newArray = Compact ("Red", "green", "yellow", "Blue", "array");
Use the Extract ()
PHP String Handling functions
Addcslashes? Adds a backslash escape character to a partial character inside a stringAddslashes? Escapes characters inside a string in the specified mannerBin2Hex? Converts binary data to hexadecimal
Actual development, more or less will encounter array sorting problem, in addition to the regular write simple sorting algorithm, PHP also provides a built-in array sorting function, this focus on sharing: Uasort use a user-defined comparison
Is_array(PHP 4, PHP 5, PHP 7)is_array- Detecting If a variable is an arrayIs_array Mixed $var )If var it is an array, TRUE It is returned FALSE , otherwise.
Explode(PHP 4, PHP 5, PHP 7)explode- using one string to split another stringArray
[IOS development] sorting of arrays in LinqLinq To Objective-C
Original article address: www.bkjia.com
Bringing a Linq-style fluent query API to Objective-C.
This project contains a collectionNSArrayAndNSDictionaryMethods that allow you to execute
Comparing strings is one of the important features of string processing in any programming language. In PHP, you can use the comparison operator signs (=, ) to compare the strings. In addition, you can also provide a series of comparison functions
The 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 functions can be used without installation.PHP 5 Array function
PHP String functions are part of the PHP core. These functions can be used without installation.
function
Description
Addcslashes ()
Returns a string that adds a backslash before the specified character.
function
Description
Array ()
Creates an array.
Array_change_key_case ()
Change all the keys in the array to lowercase or uppercase.
Array_chunk ()
Splits an array into a new array block.
Directory
What collection classes are there?
Set class
Queue class
List class
Map class
HashMap implementation principle, whether thread-safe, how to make it thread-safe
The realization
One, Custom functionThe custom function is our own defined function, in PHP the custom function format is as follows:function Funname (arg1, arg2, Arg3 ...) {Todoreturn values;}
The code is as follows
Copy Code
function
function Listdirfiles (){Setting up a directory$dirs = './';
To declare an array of folders and files$aFolders = Array ();$aFiles = Array ();
$ocfolder = Opendir ($dirs);//The function returns a directory stream, otherwise it returns false and an
Introduction to PHP ArrayThe array function allows you to manipulate the array.PHP supports single-dimension and multidimensional arrays. It also provides functions to construct arrays using database query results.InstallationThe array function is
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.