The distribution of data in multidimensional space is always sparse and uneven. At the location where the event occurs, the data is aggregated and the density is large. Therefore, developers of OLAP systems should try to solve the problem of data
PHP uses Array_multisort to sort multiple arrays or multidimensional arrays, and the PHP multidimensional array is sorted
PHP Array_multisort can be used to sort multiple arrays at once, or to sort multidimensional arrays based on one dimension or
Ask: How to build a multidimensional array of SQL query results
The function I want to implement is this:
I pass a string of numbers for SQL to receive, the number in the form of the ID value of the dish, similar to "one-in-one," after the query can
Table Cms_top: ID name1 International News2 Domestic NewsTable Cms_category: ID name tid (connect to Superior) 1 International Entertainment News 12 International Sports News 13 International political News 14 Domestic Entertainment
Let me give you an example:
For example Array_multisort ($a, $b), $a, $b is two arrays, and if sorted, the 3rd element of the $a array is ranked first, then the third element of $b regardless of the size of his $b in the first place. Look at the
For example, I have a multidimensional array $relationshop_list, which has IDs, with sort two columns, and I want the array to be sorted in descending order of ID, sorted in sort of way:Sort$array _field = Array_column ($relationshop _list, ' sort ')
array_multisort-to sort multiple arrays or multidimensional arrays, arraymultisort multidimensional
array_multisort-sorting multiple arrays or multidimensional arrays successfully returns true otherwise false
The input array is treated as a column
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.