{$property} =& new $class_name($this->db_index); $this->modules[$module] =& $this->{$property}; } foreach ($elements as $element) { if ($something) { // Do IF. } else if ($somethingElse) { // Do ELSE. } } switch ($blah) { case 'one': echo 'one'; break; default: echo 'another'; } ?>