数据组循环入库
pid,uid一样,把下面变量以|分割后一组一组的入库
比如第一组数据:1,2,1996年,1月,2002年,9月,实验中学,计算机,初中,1
比如第二组数据:1,2,2002年,1月,2005年,9月,路桥中学,计算机,高中,2
比如第三组数据:1,2,2005年,3月,2008年,9月,浙江工业大学,工商贸易,大专,3
......
有几组入库几组
$pid=1;
$uid=2;
$jystartyear='1996年|2002年|2005年';
$ajystartyear = array();
$ajystartyear = explode('|',$jystartyear);
$jystartmonth='1月|1月|3月';
$aystartmonth = array();
$aystartmonth = explode('|',$jystartmonth);
$jyendyear='2002年|2005年|2008年';
$ajyendyear = array();
$ajyendyear = explode('|',$jyendyear);
$jyendmonth='9月|9月|9月';
$ajyendmonth = array();
$ajyendmonth = explode('|',$jyendmonth);
$jyschool='实验中学|路桥中学|浙江工业大学';
$ajyschool = array();
$ajyschool = explode('|',$jyschool);
$jyspeciality='计算机|计算机|工商贸易';
$ajyspeciality = array();
$ajyspeciality = explode('|',$jyspeciality);
$jyeducation='初中|高中|大专';
$ajyeducation = array();
$ajyeducation = explode('|',$jyeducation);
$jyeducation_id='1|2|3';
$ajyeducation_id = array();
$ajyeducation_id = explode('|',$jyeducation_id);
$sql = "insert into resume_education (pid,uid,startyear,startmonth,endyear,endmonth,school,speciality,education,education_cn) values('$pid','$uid','?','?','?','?','?','?','?','?')";
已经把变量分割成数组,请问下怎么循环入库,麻烦知道的大哥直接给下代码,谢谢了,小弟是菜鸟