handler = 'friends'; $obj->title = "Widget $i"; $w[] = $obj; } $column1 = array($w[0], $w[1]); $column2 = array($w[2], $w[3]); $column3 = array($w[4], $w[5]); $widgets = array(1 => $column1, 2 => $column2, 3 => $column3); $num_columns = 3; echo '
'; $widget_class = "elgg-col-1of{$num_columns}"; for ($column_index = 1; $column_index <= $num_columns; $column_index++) { $column_widgets = $widgets[$column_index]; echo "
"; if (is_array($column_widgets) && sizeof($column_widgets) > 0) { foreach ($column_widgets as $widget) { echo elgg_view_entity($widget); } } echo '
'; } echo '
'; ?>