Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
Allow for easier editing of content by users who didn't make the site.
1
710
posted 16 years ago by EvanL
Loads the contens of a dir an sorts them by the date of creation.
2
1052
posted 16 years ago by romanos
Using this convention, you can override any system table setting.
1
780
posted 16 years ago by shrop
The code for my wordpress Archives page, there have been a few people who asked how I did it.
0
840
posted 16 years ago by kristin
在UTF-8的編碼下縮減å—串並é¿å…ä¸æ–‡å—串最後一個å—變亂碼
0
1169
posted 16 years ago by multani
Convert an number to a position / ranking. 1 becomes 1st, 2 becomes 2nd, etc...
2
1110
posted 16 years ago by distinctdev
I use this code to place in blocks or pages to show a link to the user registration page if the user is not currently logged in. An example is a block I have setup on the home page of http://www.lightentheload.net. If the user is logged in, the block...
0
813
posted 16 years ago by shrop
This can be used as a general function to get the value stored in any of the possible input sources.
use
0
851
posted 16 years ago by luizlopes
This is a stipped-down version of the original page.tpl.php from Drupal 5.x's Bluemarine theme. Just add your own DIVs.
2
724
posted 16 years ago by panatlantica
This function uses the power of regexp to check if some bad word are on the text, also offers the posibility to change those word for something else. Examples:\r\n\r\n$texto = \'fuck off!\';\r\nfiltrado($texto); returns true since a bad word has been...
1
989
posted 16 years ago by oso96_2000
This was taken out of a presentation by eZ systems on PHP Best Practices
0
750
posted 16 years ago by luizlopes