2017-06-10 7 views
0

ich fragen, ob es möglich ist, mehrere doppelte Anführungszeichen zu dem Eingabewert hinzuzufügen, wie folgt aus:Mehrere doublequotes in Eingangswert

<input value= "<iframe src="http://xxx.xx/embed?t=<?php the_title(); ?>" 
width='640' height='360' 
allowscriptaccess='always' allowfullscreen='true' 
scrolling='no' frameborder='0'></iframe>" 

Also, das ganze Element in doppelten Anführungszeichen eingewickelt, so wie der Wert des Attributs src (die URL), aber die URL wird nicht im Wert enthalten sein.

Kann dies erreicht werden?

+1

Mögliche Duplikat [Escaping Anführungszeichen in PHP] (https://stackoverflow.com/questions/ 7999148/Escape-Anführungszeichen-in-php) – ShiraNai7

+0

Sein nicht duplizieren, ich habe HTML-Wert nicht PHP, es funktioniert nicht für HTML –

+0

Warum haben Sie Ihre Frage mit [php] dann? – ShiraNai7

Antwort

1

Sie können versuchen, doppelte Anführungszeichen mit Backslash ..... Für weitere Informationen besuchen How to properly escape quotes inside html attributes?

<input value= "<iframe src=&quot;http://xxx.xx/embed?t=<?php the_title(); ?>&quot; 
width=&quot;640&quot; height=&quot;360&quot; 
allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; 
scrolling=&quot;no&quot; frameborder=&quot;0&quot;></iframe>" 
Verwandte Themen