[eluser]chejnik[/eluser]
Hello, thank you for help. Now I know how to get to the value
Code:
function makePageHeadwordFill($word)
{
$this->load->model('Settings_model');
// returns array
$page = $this->Settings_model->select_makePage($this->session->userdata('i'));
$i=0; $j=0;
foreach ($page as $item) {
$i++; $j++;
$headings[$i]= $item["onWeb"];
switch ($item["nameInputElement"]) {
// hidden element
case '0':
$elements[$i]=$item["onWeb"];
$i++;
$elements[$i]= form_hidden($item["databaseRowName"], $word[0][trim($item["databaseRowName"])]);
break;
// input element
case '1':
$elements[$i]=$item["onWeb"];
$i++;
$elements[$i]= form_input($item["databaseRowName"], $word[0][trim($item["databaseRowName"])]);
break;
// text element
case '2':
$elements[$i]=$item["onWeb"];
$i++;
$elements[$i]= form_textarea($item["databaseRowName"], $word[0][trim($item["databaseRowName"])]);
break;
default:
}
}
$output ='';
$table = $this->table->make_columns($elements, 2);
$data["completePage"] = $this->table->generate($table);
return $data;
}
Because it is a single row I come to the array first array [0]
Have you seen some other mistakes, and do you think it is generally good idea to get the name of the database tables and make from them dynamically the html tables filled with database values?
I implement this principle because I want to be the database tables fully modifiable by new users according to each language specific needs in dictionary development.
Thanks Ales