Welcome To Snipplr
Everyone's Recent Snippets Tagged php
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
PHP
Convert incorrectly-formatted UTF-8 strings of HTML into correctly-formatted UTF-8 strings of plain text.
Useful for taking incorrectly-formatted UTF-8 strings containing HTML data, and converting them to correctly-formatted UTF-8 plain text.
A handy tool for displaying HTML stored in a database.
4
1900
posted 16 years ago by X3Maverick
Secure, Advanced, Better, Faster... function for remove/strip tags(Anti-XSS).
2
1207
posted 16 years ago by YPY
With this code you can pull all admin view files for a particular CakePHP controller in their own admin folder rather than renaming each file admin_whatever.
Line 779 in cake/libs/view/view.php
0
618
posted 16 years ago by madmanlear
Include drupal 5 mission statement in views or other php enabled sections(i.e.: Views Header, etc.).
1
615
posted 16 years ago by reverend
The problem is some times the redirect may kick you off to the next page before all the session variables have been saved. The true solution to lost session vars on redirect is to simply call session_write_close(); before setting the redirect header....
0
1431
posted 16 years ago by Wardy
Function replaces all non-alpha-numeric chars and cleans up a text string. Should output a usable URL for almost all text.
1
1018
posted 16 years ago by DaveChild
To use the resize function you must pass in the forced width, forced height, source image, and destination image. The function then uses the GD2 library functions to read the source image's size. It will then calculate the new image's size based off...
3
986
posted 16 years ago by Jenhale