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 860 posted 14 years ago by s0l1dsnak3123
Add to functions.php file.
0 715 posted 14 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 508 posted 14 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 579 posted 14 years ago by aristoworks
0 656 posted 14 years ago by yazu
Used to convert URLs in a string into links
1 412 posted 14 years ago by jspicher
Convert string to underscore, for SE safe URLs etc.
1 478 posted 14 years ago by jspicher
Used to sanitize user input for email.
0 482 posted 14 years ago by jspicher
Used to cleanly truncate text.
0 475 posted 14 years ago by jspicher
This piece of code will store each line of a txt file into a mysql database
2 998 posted 14 years ago by fackz
1 488 posted 14 years ago by radarseven
1 896 posted 14 years ago by shahways
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 593 posted 15 years ago by kossmoss
Nice simple snippet. Great for forum scripts.
1 774 posted 15 years ago by Unreal
First Remove all capital letters, then capitalise the first ones in each word.
1 624 posted 15 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 636 posted 15 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 1632 posted 15 years ago by X3Maverick
Two functions. 1) Find the string between characters. 2) Create array of strings found between two characters.
1 643 posted 15 years ago by jamesming
Another way of showing long text to end user...
0 651 posted 15 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 610 posted 17 years ago by Navegante
1 2 Next »