【发布时间】:2019-03-05 05:15:05
【问题描述】:
我有这个:
$data = '<tag>content</tag>';
我想知道是否可以修改标签内的内容,以及如何修改。
例如,如果用户输入“汽车”,那么变量应该是:
$data = '<tag>car</tag>';
这是为了将用户输入从 HTML 表单插入到变量中。变量本身应该包含一个 XML 结构。
【问题讨论】:
-
$data = '<tag>something else</tag>';?不清楚你到底在问什么 -
This is for the purpose of inserting user input from an HTML form into the variable. The variable itself is supposed to contain an XML structure.差不多就是这样,不再深入探讨。有关更多详细信息,我正在尝试通过 PHP curl 将变量作为 XML 发送到其他地方。 -
向我们展示您的 xml 数据