Archive for July, 2008

Merging objects in php

July 30th, 2008 | Category: Programming, php

I swear, stdClass in php are just associative arrays without builtin functions to do this crap.

$foo1 = new stdClass();
$foo2 = new stdClass();

$foo3 = new stdClass();

$foo1->one = “1″;
$foo2->two = “2″;

foreach ( $foo1 as $key => $value ) {
$foo3->$key = $value;
}
foreach ( $foo2 as $key => $value ) {
$foo3->$key = $value;
}

var_dump($foo3);

No comments

Cooking with Vince (With other people’s recipies)

July 05th, 2008 | Category: cooking

Moved to Slicehost

July 01st, 2008 | Category: Uncategorized

Giving up on dreamhost, tired of the slow page loads, overloaded databases, etc.

Trying out slicehost for the next few months, seems ok so far since it gives me a playground for my other more interesting things involving java that I want to play with.

No comments