Monthly Archives: May 2011

Really simple CSS compression function in PHP

Thanks to the simple syntax of CSS, we can easily compress the CSS code with a PHP function of only 3 lines of codes. Since the compression will remove all the code indention and comments so it should be apply to production codes only. Here is the CSS compression that I used in my projects. […]

Fixing the drive letter for RAMDisk without saving and loading drive image – A solution for Dataram RAMDisk

[Note: 我們另外為此文章撰寫了中文版本,請看這篇。] Using RAMDisk One of the most popular RAMDisk solution is Dataram RAMDisk. It is FREE to setup a RAMDisk of max. 4GB size, running in both 32-bit & 64bit Windows systems (Usually other RAMDisk solutions would charge quite much for a 64bit version.) with promising performance. If you are using a 32bit Windows, Dataram […]

Check if an array is associative or sequential(indexed) in PHP

In PHP, depending on the type of the keys in an array, the array can be identified as associative (if the key is a string like $arr[‘mykey’]) or sequential (some may call it indexed, i.e. if the key is an integer like $arr[1], $arr[2], etc.). Although the internal representation of both associative and sequential arrays […]