]> last 20 snippets from www.jonasjohn.de This feed shows the last 20 snippets added to www.jonasjohn.de http://www.jonasjohn.de Thu, 02 Sep 2010 16:25:42 +0200 Thu, 02 Sep 2010 16:25:42 +0200 rss74/v0.3 http://blogs.law.harvard.edu/tech/rss en-us Swap array http://www.jonasjohn.de/snippets/php/swap-array.htm http://www.jonasjohn.de/snippets/php/swap-array.htm
Since PHP 4 there exists a build in function for this snippet: array_flip. ]]>
Sat, 21 Jun 2008 00:00:00 +0200
Randomize SQL query results http://www.jonasjohn.de/snippets/php/randomize-sql-query-results.htm http://www.jonasjohn.de/snippets/php/randomize-sql-query-results.htm Mon, 11 Feb 2008 00:00:00 +0100 Caching for dynamic content http://www.jonasjohn.de/snippets/php/caching.htm http://www.jonasjohn.de/snippets/php/caching.htm to optimize the caching of a website. If used correctly this will speed up
your page loads. ]]>
Wed, 06 Feb 2008 00:00:00 +0100
Split an array into chunks http://www.jonasjohn.de/snippets/php/array-split-into-parts.htm http://www.jonasjohn.de/snippets/php/array-split-into-parts.htm This can be useful for creating columns or dividing a list in multiple parts. ]]> Thu, 10 Jan 2008 00:00:00 +0100 Delete temporary files http://www.jonasjohn.de/snippets/php/delete-temporary-files.htm http://www.jonasjohn.de/snippets/php/delete-temporary-files.htm This works good for cleaning cached files. ]]> Mon, 10 Dec 2007 00:00:00 +0100 ROT13 transform http://www.jonasjohn.de/snippets/php/rot13.htm http://www.jonasjohn.de/snippets/php/rot13.htm characters of a string 13 places forward.

Hint: Since PHP 4+ you can use the PHP build-in function str_rot13.
This is just a example implementation to show how it works. ]]>
Mon, 10 Dec 2007 00:00:00 +0100
Format string as machine compatible key http://www.jonasjohn.de/snippets/php/format-as-key.htm http://www.jonasjohn.de/snippets/php/format-as-key.htm
That function works fine for creating urls or ID keys. ]]>
Sun, 09 Dec 2007 00:00:00 +0100
MD5-based block cipher http://www.jonasjohn.de/snippets/php/md5-based-block-cipher.htm http://www.jonasjohn.de/snippets/php/md5-based-block-cipher.htm It is very useful to encrypt secret data before transfer it over the network. ]]> Sun, 09 Dec 2007 00:00:00 +0100