Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged number



« Prev 1 Next »
  1. FAV

    Wordpress - remove the version number from styles and scripts

    Put it in functions.php
    PHP 4 views posted 5 years ago by burnandbass
  2. FAV

    Check 10- and 11- digit phone numbers

    Return a pure 10-digit phone number if the number given is 10 digits or 11 digits.
    PHP 7 views posted 7 years ago by chrisvogt
  3. FAV

    Wordpress Native Pagination Links With Page Number No Plugin Needed

    Create navigation links without the need of a plugin, using paginate_links function of wordpress core.
    PHP 7 views posted 7 years ago by rudwolf
  4. FAV

    Separate street and number from an address

    Straatnamen en huisnummer splitsen, hieronder diverse types straatnamen Bron: http://www.pfz.nl/archief/965267-adres-splitsen-in-straatnaam-en-huisnr/
    PHP 8 views posted 7 years ago by MGHollander
  5. FAV

    Number to word converter (0-1 googol)

    Takes a number (no decimal) and converts it to written words.Why'd i write it to be able to do such big numbers? Why not? Note: The numbers next to the 'thousandfoldnums' are for your reference (thats how many zeros/places there are in that numbe...
    PHP 2 views posted 8 years ago by lasavior
  6. FAV

    Check if File Exists / Append Number to Name

    PHP 1 views posted 8 years ago by dubogii
  7. FAV

    Change Month Number to Month Name

    PHP 1 views posted 8 years ago by dubogii
  8. FAV

    Find The Number Of A Week In A Month For A Given Date

    This simple function allows you to find a weeks position in the month based on a given date. For instance I needed to alert the user their date was the "Second Week Of January" during a given month. I may never use it again but it came in very hand...
    PHP 12 views posted 8 years ago by aristoworks
  9. FAV

    PHP Split a number into the integer and fraction parts

    I needed to split a decimal number into the integer part and the fraction part and save both of them in different variables
    PHP 2 views posted 9 years ago by bwangila
  10. FAV

    Wordpress Search Results Number

    Add this in search.php
    PHP 1 views posted 9 years ago by laurentzziu
  11. FAV

    Wordpress Total Number of Comments

    PHP 3 views posted 9 years ago by laurentzziu
  12. FAV

    Extract Numbers from a string

    Will help convert string to number OR get number in a selected string.
    PHP 1 views posted 9 years ago by carbonr
  13. FAV

    Magento: Get Item Number In Cart

    PHP 0 views posted 9 years ago by Groove
  14. FAV

    Page View Counter

    A simple PHP application for counting how many views a page gets.
    PHP 1 views posted 9 years ago by FelixT
  15. FAV

    Round Number to Nearest

    PHP 2 views posted 9 years ago by jodm
  16. FAV

    Number to word converter "1->one" up to the million place

    this could be expanded to the billions place, but c'mon really people? it's got to call it quits somewhere
    PHP saved by 1 person 2 views posted 9 years ago by adkatrit
  17. FAV

    Price without decimals unless necessary

    Will strip off the decimals of a number (price) unless they are necessary.
    PHP 1 views posted 9 years ago by jmiller
  18. FAV

    Strip out all but numbers

    Strips out every character except 0-9
    PHP 1 views posted 10 years ago by jmiller
  19. FAV

    Validate North America Phone Number

    PHP saved by 2 people 2 views posted 10 years ago by Shifter
  20. FAV

    Validate Credit Card Number

    PHP saved by 3 people 8 views posted 10 years ago by Shifter
  21. FAV

    Sum the number prime

    PHP saved by 2 people 1 views posted 10 years ago by cobra90nj
  22. FAV

    PHP Check if number is odd

    PHP 3 views posted 11 years ago by Wardy
  23. FAV

    Get Apache Version

    Return just the Apache version number of your server, and operating system, from $_SERVER['SERVER_SOFTWARE'] Example: print ('Apache Version: ' . apacheversion()); will return something along the lines of... "Apache Version: 2.2.10 (Unix...
    PHP saved by 2 people 1 views posted 11 years ago by iridium
  24. FAV

    Shortest 4 digit PIN's (1000 - 9999)

    PHP 0 views posted 11 years ago by jtkendall
  25. FAV

    Even Shorter 4 digit PIN's

    PHP 0 views posted 11 years ago by jtkendall
  26. FAV

    Shorter 4 digit PIN's

    PHP 0 views posted 11 years ago by jtkendall
  27. FAV

    PHP: Pad single digit number to 2.

    PHP saved by 3 people 1 views posted 11 years ago by plasticated
  28. FAV

    PHP (RegEx) Telephone Number Validation

    A simple method of validating a telephone number using regular expressions and PHP
    PHP saved by 15 people 12 views posted 11 years ago by aristoworks
  29. FAV

    Convert a number to a position / ranking

    Convert an number to a position / ranking. 1 becomes 1st, 2 becomes 2nd, etc...
    PHP saved by 4 people 5 views posted 11 years ago by distinctdev
  30. FAV

    How to check if a number is odd or even

    How to check if a number is odd or even in PHP. Could also use the MOD (%) function, but apparently this method is better performance-wise.
    PHP saved by 24 people 15 views posted 12 years ago by andyhartleeds
« Prev 1 Next »