Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged html



5 123 posted 10 years ago by iTony
This function is very helpfull when you need to put some data (that was gotten from database) to HTML table. You can choose vertical or horizontal types. **Horizontal type:** | 1 | 2 | 3 | | 4 | 5 | 6 | | 7 | 8 | 9 | **Vertical type:**...
1 190 posted 11 years ago by kirik
Converts a given RGB colour value such as that provided by the imagecolorat() function into an html compliant colour.
1 78 posted 11 years ago by h4rrisonjames
In PHP, it is easy to extract an excerpt of a text string with a given length limit. But if you want to extract an excerpt from HTML, the tags that may exist in the text string make it more complicated. This class provides a solution to extract ex...
2 95 posted 11 years ago by hasantayyar
3 102 posted 11 years ago by cshaiku
2 119 posted 11 years ago by cshaiku
Some PHP code that can be used to get formatted HTML containing N number of tweets for a given twitter user.
5 147 posted 11 years ago by gripnrip
Transform text (eg. from a WYSIWYG) into nicely formatted HTML paragraphs. (Credits: Ludo Magnocavallo's LightPress). [this is a solid starting point - but a lot of HTML elements are missing]
3 62 posted 11 years ago by iroybot
closes opened tags in text piece. original code slightly modified to supress PHP warnings NOTE: need to fix the order of closing tags to get standards compliance
0 86 posted 11 years ago by kossmoss
These 4 lines of code can be used to extract and return all links from any page using regex patterns. If links are found, an array is returned, else boolean false is returned.
4 171 posted 11 years ago by gdvickery
A simple to use framework for a contact form. This is missing some serious validation and such but is a good startin' point for any simple contact form. The input field named 'botty' is an input field we hide with css.. if data is sent to the ha...
7 227 posted 11 years ago by jadedbat
Simple PHP tutorial on how to use isset.
0 213 posted 11 years ago by 1man
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 777 posted 11 years ago by X3Maverick
Here is a working example on how to sort data in a grid.
1 134 posted 11 years ago by assaado
0 60 posted 11 years ago by garretjames
Secure, Advanced, Better, Faster... function for remove/strip tags(Anti-XSS).
2 149 posted 11 years ago by YPY
0 68 posted 11 years ago by liuran
A function to remove tags and to also remove excess spaces.
1 116 posted 11 years ago by donkeykong
Pre-selects an html form with a requested value... ie; editing a form from a database
0 97 posted 11 years ago by davidsword
5 115 posted 12 years ago by iTony
Allow for easier editing of content by users who didn't make the site.
1 74 posted 12 years ago by EvanL
This is a version of Textile that only accepts paragraps, bold, italics, links, and images. Enjoy.
1 115 posted 12 years ago by evanwalsh
Not mine. Changed from the original it to suit my needs.
2 137 posted 12 years ago by cubit
These two functions allow you to remove images from html page. The function returns an array of images with the absolute src and,if there are any, the alt and title attributes. Arguments to pass to get_images() are $file = html source and $url = th...
3 137 posted 12 years ago by gandalf
1 86 posted 13 years ago by nicolaspar
3 128 posted 13 years ago by llbbl
6 221 posted 13 years ago by llbbl