This video is made for learning about count, array merge and sort function in PHP.
The count() function returns the number of elements in an array.
Syntax
count(array,mode);
array_merge — Merge one or more arrays
Description ¶
array array_merge ( array $array1 [, array $... ] )
Merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array.
If the input arrays have the same string keys, then the later value for that key will overwrite the previous one. If, however, the arrays contain numeric keys, the later value will not overwrite the original value, but will be appended.
Values in the input array with numeric keys will be renumbered with incrementing keys starting from zero in the result array.
Parameters ¶
array1
Initial array to merge.
...
Variable list of arrays to merge.
Return Values ¶
Returns the resulting array.
sort — Sort an array
Description ¶
bool sort ( array &$array [, int $sort_flags = SORT_REGULAR ] )
This function sorts an array. Elements will be arranged from lowest to highest when this function has completed.
Parameters ¶
array
The input array.
sort_flags
The optional second parameter sort_flags may be used to modify the sorting behavior using these values:
Sorting type flags:
SORT_REGULAR - compare items normally (don't change types)
SORT_NUMERIC - compare items numerically
SORT_STRING - compare items as strings
SORT_LOCALE_STRING - compare items as strings, based on the current locale. It uses the locale, which can be changed using setlocale()
SORT_NATURAL - compare items as strings using "natural ordering" like natsort()
SORT_FLAG_CASE - can be combined (bitwise OR) with SORT_STRING or SORT_NATURAL to sort strings case-insensitively
Return Values ¶
Returns TRUE on success or FALSE on failure.
Auf dieser Seite können Sie das Online-Video Learn PHP Tutorial 20 count, array merge and sort function mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Champion Mahipal 09 Oktober 2015 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 411 Mal angesehen und es wurde von 2 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!