Ver Mensaje Individual
  #7 (permalink)  
Antiguo 14/12/2009, 12:05
Avatar de mariogl84
mariogl84
 
Fecha de Ingreso: noviembre-2002
Ubicación: Barcelona
Mensajes: 433
Antigüedad: 21 años, 5 meses
Puntos: 20
Respuesta: Apostrofe dentro de un value

Con la función htmlspecialchars y usando esta combinación de comillas simples y dobles, me ha funcionado la prueba. A ver si te sirve:

Código PHP:
$a 'ha dicho "hola"';
$b "l'arbre";
$a htmlspecialchars($a);
$b htmlspecialchars($b);

echo 
'<input type="text" value="' $a '"><br />';
echo 
'<input type="text" value="' $b '">'