Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged text
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
1194
posted 14 years ago by s0l1dsnak3123
Con esta funcion podemos recortar una cadena de texto indicandole cuantos caracteres queremos que tenga y ademas no cortara la ultima palabra.
0
786
posted 15 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
836
posted 15 years ago by aristoworks
This piece of code will store each line of a txt file into a mysql database
2
1327
posted 15 years ago by fackz
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
900
posted 16 years ago by kossmoss
First Remove all capital letters, then capitalise the first ones in each word.
1
966
posted 16 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
913
posted 16 years ago by davidsword
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
2042
posted 16 years ago by X3Maverick
Two functions. 1) Find the string between characters. 2) Create array of strings found between two characters.
1
999
posted 16 years ago by jamesming
Elimina las etiquetas de párrafo <P< y </P< (sin parámetros) y las sustituye por saltos de línea <BR />.
En caso necesario inserta un <BR /> adicional para simular la separación de párrafos.
0
915
posted 18 years ago by Navegante