Welcome To Snipplr
Everyone's Recent PHP Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
This is saved from Gerhard Slettens weblog www.gersh.no. I just want yo keep it on snipplr so it easily can be fetched through textmate.
15
2937
posted 16 years ago by stavelin
Pre-selects an html form with a requested value... ie; editing a form from a database
0
762
posted 16 years ago by davidsword
For a complete list of time/date parameters, visit: http://php.net/manual/function.date.php
1
673
posted 16 years ago by Jaymoon
Allows you preserve and update a query string and it's existing values easily, instead of constantly appending the new value to the end of the query string
1
1036
posted 16 years ago by simplistik
I'm working on a web app that requires me to track nearly 300 form fields. To make this easier, and to allow me to handle special cases, I needed to assign them to an internal array. The switch/case statement makes this a breeze.
1
774
posted 16 years ago by mdrisser
Repeatable Fisher Yates Array Shuffle based on given random string. If no seed is provided the current second will be used (not to use as a pure random shuffle... based on microseconds)
0
1045
posted 16 years ago by digdan
This function will allow you to use '#ABCDEF' or '0xEEFF33' instead of the RGB values required for imagecolorallocate() by stripping away any non hex characters. It will also check and make sure that it's a valid 6 digit hex value after the stripping...
0
732
posted 16 years ago by Jacolyte
The plugin's "shave_all" function was not properly cropping and resizing the thumbnails for me. The following needs to be changed in sfImageMagickAdapter.class.php
1
669
posted 16 years ago by catchamonkey