Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged format
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
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...
1
914
posted 11 years ago by devowhippit
Use: echo format_size(filesize("fichier"));
Example result: 13,37 Ko
0
950
posted 12 years ago by zhyar
Example call: $menuName = sleek_get_theme_menu_name('footer-menu')
0
1162
posted 13 years ago by Huskie
The date format is dd/mm/YYYY but you can replace slashes by anything else.
0
873
posted 13 years ago by ptiswitz
Turns /n to <br> and /n/n to </p><p>
Usage:
echo stripslashes(nl2br(nls2p($text)));
0
849
posted 14 years ago by jmiller
Assumes that the record has a `name` field which represents the name of the location and always has a defined two character `country` field.
0
887
posted 14 years ago by iloveitaly
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...
0
917
posted 15 years ago by mpontus
This snippet collects a date from a var and formats it into the correct format for database date entry
0
929
posted 15 years ago by daveismyname
this function formats a web address for use in a link.<br>
echo formatWebAddress("google.com");<br>
http://www.google.com/
1
774
posted 15 years ago by jlvallelonga
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
0
703
posted 15 years ago by iloveitaly
This changes the date format from y-m-d to d-m-y on PHP. It's easy to change the - to / or spaces...
0
1179
posted 16 years ago by isaac
This changes the date format from d-m-y to y-m-d on PHP. It's easy to change the - to / or spaces...
1
1403
posted 16 years ago by isaac
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.
2
1146
posted 17 years ago by meme
« Prev 1 Next »