Published in: PHP
Basics for formatting and generating numbers
// Generate a random number // Check whether one number is divisible by another as a whole number // Returns the remainder only - therefore a zero equals a whole number $divisible = $number_to_check % $divisible_by; // Formatting numbers // Zero padded numbers // Setting decimal places // Formatting a number with commas, no decimal places // Formatting a number with commas, 2 decimal places // Round to the nearest .05 // Round down to nearest 10 // Number of one hundredths round up
You need to login to post a comment.
