Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Many scripts rely on `$_SERVER[SCRIPT_URL]` which is sometimes missing. This function detects it from other server variables and fixes the missing field.
1
1590
posted 14 years ago by drwitt
Credit goes to B. Kemler. I'm simply saving this for future reference.
0
826
posted 14 years ago by jhafner
Orders a multi-dimensional array by one of it's fields.
There is also the option to treat this like an SQL-style 'order by' query with the $field value passed in (ie. 'user_id desc') to do reverse ordering.
0
623
posted 14 years ago by browncardigan
This PHP class lets you clean and repair html code. WHAT IT DOES: delete closed tags without their opening tag, fix open tag without close, closing them automatically, check bad nesting and fix them, fix bad quotes in attributes, merge different styl...
2
2328
posted 14 years ago by ginoplusio
PHP encrypts your E-mail address and generates the javascript that decrypts it. Most bots and spiders can't execute javascript and that is what makes this work.
3
1106
posted 14 years ago by fackz
themes the primary links adding spans (useful for sliding doors technique) and nice ID's based on the link title rather than the standard ugly menu-851 classes etc.
1
939
posted 14 years ago by ReeceMarsland
make a tarball of only the changed directories in a git repos, since last tag.
replace {tagname_last} with any name you siwh to give the tarball
replace {tagname_previous} with a git reference (like a tag) from which you want to zip the changes.
0
1001
posted 14 years ago by berkes
The following is just a list of actions you can remove. Just grab the ones you need.
1
611
posted 14 years ago by chrisdpratt
Array associativa de estados brasileiros com sigla pra chave e nome para valor.
0
952
posted 14 years ago by rudwolf
Wizzlern, a Dutch Drupal trainer, has a Dutch article online on how to remove the "search this site" label in the Drupal search-block.
2
934
posted 14 years ago by berkes