Welcome To Snipplr
Everyone's Recent PHP Snippets Tagged php
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This function can validate and parse UK postcode like SW1A 1AA in to formated array.
2
872
posted 14 years ago by naz
This will always show the correct date... so it'll say "Copyright 2008 Comapany Name" now, and at exactly midnight on 1st January 2009, it'll say "Copyright 2009 Company Name". Simple!
2
515
posted 14 years ago by tigercore
A small function I made to chmod directories and files recursively, with different permissions.
2
724
posted 14 years ago by Tenzer
Stolen from the mentioned URL - this is used to make SPRY Framework work together with MYSQL.
2
609
posted 14 years ago by Nils
An easy debug trick: gives you a variable that you can print in any tpl.php to find out what vars you have available there.
1
582
posted 14 years ago by berkes
CSS files for larger sites can become pretty large themselves. Gzipping or compressing these files has shown to provide a reduction in the neighborhood of 70-80% of the original file size, a fairly significant 'weight loss'.
16
1327
posted 14 years ago by johnself
In light of last nights tornado warnings here in TN, I thought it appropriate to post this little bit of code that I use to alert myself and others of dangerous weather conditions via SMS/Email alerts.
I run this through cron at Dreamhost without...
9
581
posted 14 years ago by johnself
PHP function that creates a mySQL INSERT statement for mime types. Type are extracted from a text file.
0
468
posted 14 years ago by fabian
You have banners on your page for advertising? Then you have to randomize the order to be fair.
2
360
posted 14 years ago by HenLen
Remove excess whitespaces from string
Remove espaços em branco em excesso de uma string
1
565
posted 15 years ago by rafaelmt