Author: Bram Esposito

  • Convert php Arrays to Objects

    Sometimes you need a php Array in an Object or the other way around:

    
    class Utils{
    
    	static function array2object($data) {
    	   if(!is_array($data)) return $data;
    	   
    	   $object = new stdClass();
    	   if (is_array($data) && count($data) > 0) {
    	      foreach ($data as $name=>$value) {
    	         $name = strtolower(trim($name));
    	         $object->$name = Utils::array2object($value);
    	      }
    	   }
    	   return $object;
    	}
    	
    	static function object2array($data){
    	   if(!is_object($data) && !is_array($data)) return $data;
    	
    	   if(is_object($data)) $data = get_object_vars($data);
    	
    	   return array_map('object2array', $data);
    	}
    }
    

    from

  • import your mail to Gmail

    Last week Google introduced the Google Email Uploader for Mac . It’s an app that lets you upload email from various clients (Mail.app, thunderbird, outlook, eudora, etc) to Google Apps.

    After toying around with the software it warned me it doesn’t support (free) Gmail-accounts.

    I was really disappointed until I remembered Gmail supports IMAP. After creating an account for Gmail in Mail.app I was able to drag any message to the Gmail mailbox.

    It looks like the Google Email Uploader for Mac offers no more options than a classic IMAP mail client.

  • Career switch

    Feeling sorry for leaving my new friends at #thesedays, Had a hard time deciding but I’m joining the #VUB. #career #toughdecision

  • (22b) @twunch I’ll be there!

  • considering a mobile vikings prepaid Sim card. I mobile vikings still the smartest choice in Belgium?#mobile #iphone #3G

  • ok, we weten ondertussen dat ze bij #thesedays appelbollen eten. #delenofzwijgen (via @dipfico)