Answer the question
In order to leave comments, you need to log in
How to output array from controller in Kohana?
Controller
<?php defined('SYSPATH') OR die('No direct access allowed.');
class Controller_Main extends Controller_Template {
public $template = 'index';
public function action_index(){
$data = array ("name" => "вася", "age"=>"24", "rost"=>"189");
$this->template->content = View::factory('news');
}
}
<?PHP
foreach ($comment AS $key => $value) {
echo $value. ' - ';
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question