escapar comillas
Publicado por maria (11 intervenciones) el 31/07/2008 09:37:26
a ver si me explico bien, tengo un formulario con el siguiente código:
<tr><input name="pref" type="text"
value="<?php
include "funciones.php";
show_value_db(1);
?>" (*)
En el archivo funciones.php tengo la implementación de show_value_db(), pero antes tengo el siguiente código
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 (**)Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<?php
}
function show_value_db($numero){
//......implementacion de la funcion
}
El problema es que en vez de pillar el cierre de las comillas en (*) lo pilla en (**), con lo que me inserta en el textfield el texto " <!DOCTYPE html PUBLIC " y la funcion la ejecuta fuera del textfield. ¿Cómo hago para escapar las comillas de (**)? He probado " pero no funciona :S :S
<tr><input name="pref" type="text"
value="<?php
include "funciones.php";
show_value_db(1);
?>" (*)
En el archivo funciones.php tengo la implementación de show_value_db(), pero antes tengo el siguiente código
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 (**)Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<?php
}
function show_value_db($numero){
//......implementacion de la funcion
}
El problema es que en vez de pillar el cierre de las comillas en (*) lo pilla en (**), con lo que me inserta en el textfield el texto " <!DOCTYPE html PUBLIC " y la funcion la ejecuta fuera del textfield. ¿Cómo hago para escapar las comillas de (**)? He probado " pero no funciona :S :S
Valora esta pregunta


0