tuve otra idea( aunque tampoco me funciona) pero derponto a alguein se le ocurre algo mas
Código PHP:
$p_id = $_POST[p_id];
$option=$_POST[opcion];
$menu=$_POST[opcionm];
$texto =$_POST[texto];
$n_registrosd = count($texto);
$array_valores = array();
for ($i=0; $i <= $n_registrosd; $i++){
$array_valores[] = array('a_id' => '', 'a_mail' => $_SESSION['MM_Username'], 'a_p_id' =>'' , 'a_etapa' => 'educacion', 'a_txt' => '');
}
foreach($p_id as $p){
$array_valores[$a_p_id]=$p;
}
foreach($texto as $txt){
$array_valores[$a_txt]=$txt;
}