如何在回显php变量时在文本输入字段中保留空格


How to preserve spaces in text input field when echoing php variable

我有:

<input type="text" name="location" value=<?php echo $cand['location']; ?>>

$cand['location']类似于"East London"时,文本框只显示"East",并忽略第一个空格后的任何内容。

如何让文本输入包含带有空格的回声字符串?

已解决:

<input type="text" name="location" value="<?php echo $cand['location']; ?>">