Welcome To Snipplr


Everyone's Recent Snippets Tagged c



1 ... 374 375 376 377 378 ... 554
will split the string "I am" search words into [0] => I am [1] => searching [2] => words
1 1102 posted 15 years ago by svenito
Shortens all strings in an array to a maximum length. Inserts '...' in between the first and last 6 letters
0 1358 posted 15 years ago by svenito
Given a start path will return an array of all subdirectories excluding files
0 1302 posted 15 years ago by svenito
Remove $value from $array
0 865 posted 15 years ago by svenito
Ensures all elements in an array are unique newArray = myArray.unique();
0 835 posted 15 years ago by svenito
This extends arrays withe a removeItems operation to remove all occurances of <item> from <array> usage: myArray.removeItems("words");
0 874 posted 15 years ago by svenito
0 785 posted 15 years ago by zemin
Allows you to convert to any base between 2 and 255, effectively using all the ASCII characters. In order to convert very large numbers with arbitrary precision you’ll need the BCMath lib. Without BCMath the large numbers will not be converted c...
1 1095 posted 15 years ago by bucabay
to
0 860 posted 15 years ago by mware1205
0 1023 posted 15 years ago by vasilije
with focus() and center() methods
0 829 posted 15 years ago by manatlan
1 939 posted 15 years ago by nkm
This snippet allows you to update multiple rows of a database using a single form in one easy click
0 1670 posted 15 years ago by daveismyname
This snippet collects a date from a var and formats it into the correct format for database date entry
0 1158 posted 15 years ago by daveismyname
There are plenty of classes out there to paginate through database results, well, here's one to paginate through a static array of items. Written quite a few years ago, recently recovered from a crashed drive.
1 728 posted 15 years ago by evilwalrus
2 login functions that check if a user is logged in by checking is a session is equal to true that would have been set on login. If not logged in the redirect to login.php
1 1025 posted 15 years ago by daveismyname
very useful function that allows you to redirect to the user to a given location
1 1149 posted 15 years ago by daveismyname
1 922 posted 15 years ago by brandonio21
A monkey patch splitting a string into sentences.
0 1630 posted 15 years ago by cocomo
How to generate rounded corners in Firefox and Safari before CSS3 is fully implemented.
3 973 posted 15 years ago by ff1959
Sometimes, the first or last block in a region needs to be styled different than the rest. This solution do this in simple way for Drupal 6. (originaly code from [email protected]: http://drupal.org/node/293188#comment-1282186)
2 1059 posted 15 years ago by Fake
0 906 posted 15 years ago by wearetherock
note to self.
0 797 posted 15 years ago by obsessivejosh
This function returns the array with all instances of the specified value removed
1 1188 posted 15 years ago by jlvallelonga
Some valid UTF-8 characters are illegal in XML: http://www.w3.org/TR/REC-xml/#charsets This statement strips them from your strings.
0 2756 posted 15 years ago by jdbartlett
1 ... 374 375 376 377 378 ... 554