Welcome To Snipplr


Everyone's Recent PHP Snippets Tagged php



1 ... 17 18 19 20 21 ... 58
Takes the seconds, and returns minutes. Will wrap it in a function is anyone is interested. Example: 92s -> 1m 32s
0 1432 posted 14 years ago by nebojsac
0 891 posted 14 years ago by prianto
0 796 posted 14 years ago by tcelestino
Full email validation with regex.
0 1698 posted 14 years ago by nebojsac
The function returns the "sanitized" version of user input. Use before putting variables into SQL code.
0 1048 posted 14 years ago by nebojsac
0 1028 posted 14 years ago by kbrown
Resize and image to fit a predetermined canvas size
0 1330 posted 14 years ago by flatearthcomms
0 854 posted 14 years ago by xavsio4
Nothing revolutionary, just a simple implementation. A reworking from Brian Cray's source code: http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/ Note: requires creating a cache file, '/caches/twitter', relative to source.
0 1120 posted 14 years ago by richardmaisano
A simple function that will split a given string into sentences, and then return the number of sentences specified. Quick and dirty.
0 869 posted 14 years ago by adamturtle
Twitter have changed their api, and using the old twitter.com?status=… doesn't work anymore. This uses the new 'Web Intents' method.
0 942 posted 14 years ago by adamturtle
Function to print breadcrumb links
1 885 posted 14 years ago by stewartduffy
CodeIgniter Helper function to repopulate form values when a muli-dimensional post array key is used.
0 902 posted 14 years ago by bretticus
facebook php-sdk from https://github.com/facebook/php-sdk/
0 935 posted 14 years ago by erikportin
0 1033 posted 14 years ago by ratzo
0 800 posted 14 years ago by princeofvegas
Replace standard query_posts with the snippet to enable pagination on pages with a custom loop. Be sure to change out "somecat" with your category or add additional query arguments.
0 775 posted 14 years ago by rickfu
compress & combine CSS files and param theme with PHP vars
0 1287 posted 14 years ago by giak
0 1046 posted 14 years ago by nathanbweb
As simple as it can be. An PHP minifier. All the credits go to his author, Kit MacAllister
0 992 posted 14 years ago by thefricky
0 1124 posted 14 years ago by zayyarphone
1 ... 17 18 19 20 21 ... 58