array (1,$email,""), 'TAG_origen' => array (1,$origen,"") ); while (list($key,$value)=each($error)){ $plantilla=str_replace($key."_VALUE",$value[1],$plantilla); $plantilla=str_replace($key,"ok",$plantilla); } $plantilla=str_replace("TAG_MENSAJE","",$plantilla); echo $plantilla; ?>