|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-04-02 13:44 UTC] ricardo dot jorge86 at gmail dot com
Description:
------------
text including spaces placed in an input text control in HTML show the whole text.
text including spaces placed in an input text control in PHP does not
show the whole text, only the first word up to the first space is
displayed. The same happens with variables from a BD.
Reproduce code:
---------------
<?php
print ("<input type='text' value="any text" name='anytext'">);
?>
Expected result:
----------------
inside the text box:
any text
Actual result:
--------------
inside the text box:
any
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 06:00:01 2025 UTC |
You put: <?php print ("<input type='text' value="any text" name='anytext'">); ?> I think you are trying to do this: <?php print ("<input type='text' value='any text' name='anytext'">); ?> Use of double quotes breaks apart the string.