• How to get an unique identifier for php closure ?

    June 17, 2013

    Right to the example… $identifier = spl_object_hash(function(){ // some function content }); Simple as that. Suggestions or problems ? Write a comment.

  • How to read csv file into array ?

    June 16, 2013

    function csvToArray($file){ $rows = array(); $headers = array(); if(file_exists($file) && is_readable($file)){ $handle = fopen($file, 'r'); while (!feof($handle) ) { $row = fgetcsv($handle, 10240); if(empty($headers)) $headers = $row; else if(is_array($row)) $rows[] = array_combine($headers, $row); } fclose($handle); } else { throw new Exception($file.' doesn`t exist or is not readable.'); } return $rows; } Simple as that. Suggestions […]

  • How to use Zopim chat outside your site.

    June 11, 2013

    Most of the time Zopim chat makes your site slower.Here is an example how you can make your site load faster using Zopim chat. Step 1. Create html page zopim.html and put this code inside: Step 2. Go to the page where you want to put Zopim chat and put this code: That is! It […]

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org