Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged text



1 2 Next »
split_to_chunks splits the string up into an array with elements containing 140 characters <b>or less</b>. This enables you to keep words intact when sending automated twitter messages. $to is needed in order to subtract from 140 the amount of cha...
0 84 posted 10 years ago by s0l1dsnak3123
Add to functions.php file.
0 125 posted 10 years ago by Xtraboy
Con esta funcion podemos recortar una cadena de texto indicandole cuantos caracteres queremos que tenga y ademas no cortara la ultima palabra.
0 64 posted 10 years ago by jacinmontava
I wrote this really quick and dirty script to paginate a very large chunk of text. A client site was setup with the understanding their about page would consist of 5-6 paragraphs but their biography ended up being 60 paragraphs. At the end of the d...
0 56 posted 10 years ago by aristoworks
0 81 posted 10 years ago by yazu
Used to convert URLs in a string into links
1 38 posted 10 years ago by jspicher
Convert string to underscore, for SE safe URLs etc.
1 49 posted 10 years ago by jspicher
Used to sanitize user input for email.
0 59 posted 10 years ago by jspicher
Used to cleanly truncate text.
0 39 posted 10 years ago by jspicher
This piece of code will store each line of a txt file into a mysql database
2 167 posted 10 years ago by fackz
1 77 posted 10 years ago by radarseven
1 132 posted 10 years ago by shahways
Parse syntax in a text using preg_replace_callback.
2 83 posted 11 years ago by caioariede
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 68 posted 11 years ago by kossmoss
Nice simple snippet. Great for forum scripts.
1 87 posted 11 years ago by Unreal
First Remove all capital letters, then capitalise the first ones in each word.
1 65 posted 11 years ago by Wardy
Checks the size of skypes online "status buttons" to determine online/offline status, so you're able to use custom buttons, text.. etc, etc
2 64 posted 11 years ago by davidsword
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 744 posted 11 years ago by X3Maverick
Two functions. 1) Find the string between characters. 2) Create array of strings found between two characters.
1 81 posted 11 years ago by jamesming
Another way of showing long text to end user...
0 63 posted 12 years ago by skywalker
Elimina las etiquetas de p&aacute;rrafo &lt;P&lt; y &lt;/P&lt; (sin par&aacute;metros) y las sustituye por saltos de l&iacute;nea &lt;BR /&gt;. En caso necesario inserta un &lt;BR /&gt; adicional para simular la separaci&oacute;n de p&aacute;rrafos.
0 71 posted 13 years ago by Navegante
1 2 Next »