Archive for March, 2009
base_convert()
Convert a number from some base to some other base. You pick the “from” and “to” - both of which must be between 2 and 36 inclusive.
decoct()
Converts a decimal integer into its octal format. Non integer values will be converted and truncated before converting. The complementary function octdec() converts the octal to its decimal equivalent.
dechex()
Converts a decimal integer into its hexadecimal format. Non integer values will be converted and truncated before converting. The complementary function hexdec() converts the hexadecimal to its decimal equivalent.
decbin()
Converts a decimal integer into its binary format. Non integer values will be converted and truncated before converting. The complementary function bindec() converts the binary to its decimal equivalent.
pi()
Returns the value of pi (approximation) as a float with decimal precision based on the ini setting. The constant M_PI contains the same figure.
natsort()
Sort an array using a “natural order” algorithm. Computers and humans can have a different way of sorting things. Use natsort() for a more “natural” sorting.
usort()
Sort an array based on your own criteria. A function you define is used to compare the elements in pairs. The array itself is affected and re-indexed; this does not return a new array.
ksort()
Sorts an array by its keys lowest to highest while maintaining the associated keys (both string and numeric). The array itself is affected; this does not return a new array.
asort()
Sorts an array by value lowest to highest while maintaining the associated keys (both string and numeric). The array itself is affected; this does not return a new array.
sort()
Sorts an array by value lowest to highest. The array itself is re-indexed; this does not return a new array.
