Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged format



« Prev 1 Next »
  1. FAV

    Turn Over Address Components to an Array

    Breaks up an address (in this case returned by Advanced Custom Fields Location plugin) into it's components. Additionally, sorts a multidimensional array of locations alphabetically by state. This works for basic addresses assuming that address is in...
    PHP saved by 4 people 5 views posted 6 years ago by devowhippit
  2. FAV

    Size format function

    Use: echo format_size(filesize("fichier")); Example result: 13,37 Ko
    PHP 5 views posted 7 years ago by zhyar
  3. FAV

    PHP link href formatter

    PHP 1 views posted 8 years ago by focal55
  4. FAV

    Get WordPress theme menu name in slug format from location parameter

    Example call: $menuName = sleek_get_theme_menu_name('footer-menu')
    PHP 3 views posted 8 years ago by Huskie
  5. FAV

    Date Format Convert

    Switches 'dd mm yyyy' to 'yyyy-mm-dd'
    PHP 0 views posted 8 years ago by nebojsac
  6. FAV

    Change Date from dd/mm/yyyy to yyyy-dd-mm

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

    strotime for french date

    The date format is dd/mm/YYYY but you can replace slashes by anything else.
    PHP 1 views posted 8 years ago by ptiswitz
  8. FAV

    C# String Format Function For PHP

    PHP saved by 2 people 3 views posted 9 years ago by tudisco
  9. FAV

    Convert new lines to paragraphs

    Turns /n to <br> and /n/n to </p><p> Usage: echo stripslashes(nl2br(nls2p($text)));
    PHP 3 views posted 9 years ago by jmiller
  10. FAV

    Format Radio List in a Form Class

    PHP 0 views posted 9 years ago by sorinspanu
  11. FAV

    Short + Long Address Formatting From Address Information

    Assumes that the record has a `name` field which represents the name of the location and always has a defined two character `country` field.
    PHP 1 views posted 9 years ago by iloveitaly
  12. FAV

    Apache log line parser

    I written this code to parse apache log in common log formats. It may have problems with irresponsible formatting like non-concluded into quotes request line. I welcome any modifications to my snippet because it was written if short time and this is...
    PHP 1 views posted 10 years ago by mpontus
  13. FAV

    Date format for mysql input

    This snippet collects a date from a var and formats it into the correct format for database date entry
    PHP 3 views posted 10 years ago by daveismyname
  14. FAV

    formatWebAddress

    this function formats a web address for use in a link.<br> echo formatWebAddress("google.com");<br> http://www.google.com/
    PHP saved by 4 people 3 views posted 10 years ago by jlvallelonga
  15. FAV

    PHP format mysql date

    PHP saved by 2 people 1 views posted 10 years ago by martin_rusev
  16. FAV

    Format Currency

    PHP saved by 4 people 1 views posted 10 years ago by blackf0rk
  17. FAV

    Standardize URL String

    this function processes a URL that 'should' be a full url (i.e. http://something.com/dfsdfs/) and makes sure it contains http:// for easy inclusion as a link into a href attribute
    PHP 0 views posted 10 years ago by iloveitaly
  18. FAV

    PHP Plain date format

    Format date from yyyy-mm-dd hh:mm:ss TO yyyymmddhhmmss
    PHP saved by 3 people 1 views posted 11 years ago by gfazioli
  19. FAV

    Qcodo date format

    PHP 1 views posted 11 years ago by morroida
  20. FAV

    Easy transform date format y-m-d => d-m-y on PHP

    This changes the date format from y-m-d to d-m-y on PHP
    PHP saved by 9 people 4 views posted 11 years ago by isaac
  21. FAV

    Easy transform date format y-m-d => d-m-y on PHP

    This changes the date format from y-m-d to d-m-y on PHP. It's easy to change the - to / or spaces...
    PHP 3 views posted 11 years ago by isaac
  22. FAV

    Easy transform date format d-m-y => y-m-d on PHP

    This changes the date format from d-m-y to y-m-d on PHP. It's easy to change the - to / or spaces...
    PHP saved by 3 people 2 views posted 11 years ago by isaac
  23. FAV

    Convert MySQL Date To Something Else in PHP

    The code below will format 2008-01-30 10:58:32 to Jan 30, 2008 See the page http://us2.php.net/date for a complete list of formatting codes.
    PHP saved by 4 people 6 views posted 12 years ago by meme
  24. FAV

    PHP - Multiple Format Date Spanish

    PHP 5 views posted 12 years ago by nicolaspar
  25. FAV

    PHP - Invertir Fecha

    De aa-mm-dd a dd-mm-aa y al revé
    PHP saved by 6 people 1 views posted 12 years ago by nicolaspar
  26. FAV

    Format a phone number in PHP

    Use this to format a phone number for display on a page.
    PHP saved by 2 people 3 views posted 13 years ago by fbnewtz
« Prev 1 Next »