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 2350 posted 16 years ago by s0l1dsnak3123
Add to functions.php file.
0 1923 posted 16 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 1552 posted 16 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 1639 posted 16 years ago by aristoworks
0 1869 posted 16 years ago by yazu
Used to convert URLs in a string into links
1 1557 posted 16 years ago by jspicher
Convert string to underscore, for SE safe URLs etc.
1 1529 posted 16 years ago by jspicher
Used to sanitize user input for email.
0 1434 posted 16 years ago by jspicher
Used to cleanly truncate text.
0 1443 posted 16 years ago by jspicher
This piece of code will store each line of a txt file into a mysql database
2 2627 posted 16 years ago by fackz
1 1490 posted 17 years ago by radarseven
1 2317 posted 17 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 1751 posted 17 years ago by kossmoss
Nice simple snippet. Great for forum scripts.
1 2003 posted 17 years ago by Unreal
First Remove all capital letters, then capitalise the first ones in each word.
1 1856 posted 17 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 1734 posted 17 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 3327 posted 17 years ago by X3Maverick
Two functions. 1) Find the string between characters. 2) Create array of strings found between two characters.
1 1929 posted 18 years ago by jamesming
Another way of showing long text to end user...
0 1929 posted 18 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 1896 posted 20 years ago by Navegante
1 2 Next »