I am generating a string for placeholder dynamically via PHP echo function & if I don't put quotes around PHP tags the output only takes the first word of the string. Why so?
-
placeholder=<?php echo "Hello World"?>
It outputs only Hello in input field
-
placeholder="<?php echo "Hello World"?>"(Note quotes around PHP tags)
It outputs Hello World in input field.
Same also happens for value attribute of the input field.