Código PHP:
class ddform {
var $strSQL = "";
function generate(){
$content = (trim($this->Page)!="")?$this->Page:$this->Form;
if (isset($_POST['ddform'])) {
$keys = array_keys($_POST['ddform']);
$size = sizeof($_POST['ddform'][$keys[0]]);
$fields = implode(',',$keys);
for ($i = 1;$i<=$size;$i++) {
$values = array();
foreach ($keys as $value) {
$values[] = "'".$_POST['ddform'][$value][$i]."'";
}
$vals = implode(",",$values);
$query = "insert into predicas ($fields) values ($vals);";
}
$this->strSQL=$query;
return $query;
}
else
{
return $content;
}
}
Agradecere cuialquier ayuda
Saludos
Jachavez