如何显示插入到另一个表中的数组数据?

时间:2019-04-04 08:26:51

标签: php php-5.6

我对数组有问题。我正在获取row的数据。并将完整的行数据插入另一个表中。但是数据未正确插入。

if (isset($_POST['apply'])){
    $classid=$_POST['class'];
    $section1=$_POST['section'];
    $rowvalue=$db->get_row('fee_chart',array('class'=>$classid,'section'=>$section1));
    //$row=unserialize($rowvalue);
    print_r($rowvalue);

} // in that row data already in the array

Array ( [id] => 1 [class] => 1 [section] => 1 [jan] => a:1:{i:0;s:3:"100";} [feb] => a:1:{i:0;s:3:"100";} [mar] => a:1:{i:0;s:3:"100";} [apr] => a:1:{i:0;s:3:"100";} [may] => a:1:{i:0;s:3:"100";} [june] => a:1:{i:0;s:3:"100";} [july] => a:1:{i:0;s:3:"100";} [aug] => a:1:{i:0;s:3:"100";} [sept] => a:1:{i:0;s:3:"100";} [oct] => a:1:{i:0;s:3:"100";} [nov] => a:1:{i:0;s:3:"100";} [decem] => a:1:{i:0;s:3:"100";} [created_date] => 2019-03-28 06:06:49 [ip_add] => ::1 [timestamp] => 2019-03-28 18:06:49 )
//this is out 

//现在将此行插入到新表中。输出未正确显示

$allfee=$db->get_row('student_detail',array('id'=>16));
$fee=$allfee['feechart'];

print_r($fee);
// this is output

a:1:{i:0;s:5:"Array";}

0 个答案:

没有答案
相关问题