array (1,$Tnombre,"","","",""), 'TAG_Tapellid' => array (1,$Tapellid,"","","",""), 'TAG_Tempresa' => array (1,$Tempresa,"","","",""), 'TAG_Tdirecci' => array (1,$Tdirecci,"","","",""), 'TAG_Tlocalid' => array (1,$Tlocalid,"","","",""), 'TAG_Tcodpost' => array (1,$Tcodpost,"","","",""), 'TAG_Tprovinc' => array (1,$Tprovinc,"","","",""), 'TAG_Telefono' => array (1,$Telefono,"","","",""), 'TAG_Tfax' => array (1,$Tfax,"","","",""), 'TAG_Temail' => array (1,$Temail,"","","",""), 'TAG_Mcomenta' => array (1,$Mcomenta,"","","","") ); while (list($key,$value)=each($error)){ $plantilla=str_replace($key."_VALUE",$value[1],$plantilla); $plantilla=str_replace($key,"ok",$plantilla); } $plantilla=preg_replace("/([\s\S]*)/","",$plantilla); echo $plantilla; ?>