I want to display a table in a Zend Form. For this i used blow lines
<?php
echo $this->form. $this->partial("staff/medicalTable.phtml");
?>
in application/views/scripts/medical/index.phtml It works fine. But now I want to display a this table in a Zend Form using an array. For this i create an array like:
<?php
/**
* Array contain Table Column Name and Column records.
*/
$table = array("columnName" => array("Date","Type","Comment"),
"columnVariables" => array("1/1/09","Hepatites A","Ok"));
?>
And now how could i display my table as defined in above array, so that i could get the same result as before when there was no array for Table.
I also test http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.partial but fail to get their points
HELLO ;-> I have got some progress. but it is only for one table, the code is:
form. $this->partial("students/lunchinfoTable.phtml", array("columnName1" => "Date Enrolled", "columnName2" => "Date Canceled", "columnName3" => "Comment") ); ?>
and in my phtml file i wrote :
escape($this->columnName1);?> escape($this->columnName2);?> escape($this->columnName3);?>
But i need to apply it for many tables as i could. ie: i want to create some generic code so that i just only pass Table fields name and their values for these fields and then it display the table with passed fields.