zomeoff.com
zome off - Web development, operation and more - Page 2zome off – Web development, operation and more – Page 2
http://www.zomeoff.com/page/2
May 27, 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. Css); / remove extra single spaces $css = preg replace('/[ s]*([ ,;:])[ s]*/', ' 1', $css); }. May 17, 2011. My solution : A DOS Batch script. Update: Plea...
zomeoff.com
PHP – isset() vs array_key_exists() : a better way to determine array element’s existence – zome offzome off
http://www.zomeoff.com/php-fast-way-to-determine-a-keyelements-existance-in-an-array
April 3, 2011. PHP – isset() vs array key exists() : a better way to determine array element’s existence. Project, we’re asked to check if an element is set in an array. That is, we’re asked to determine whether $Arr[‘MyElement’] exists. So we use the following code as a start. Php if (isset($Arr['MyElement']) { . do my stuff . }? What’s wrong with isset()? According to the PHP’s manual: isset() Determine if a variable is set AND is not. The right solution: array key exists(). The array key exists() will...