【发布时间】:2018-05-04 09:50:25
【问题描述】:
<Address FormattedInd="true">
<CityName>Athens Center</CityName>
<County>'.$Country.'</County>
<CountryName Code="GR" />
</Address>
对于县,我可以使用 <County>'.$Country.'</County>。 $Country="CountryName"
但是对于像 CountryName Code="GR" 这样的单个标签,我如何将代码“GR”作为 PHP 变量传递。
在这里,<CountryName Code="GR" /> 我需要从变量传递“GR”,比如$Code = "GR";
TIA
【问题讨论】: