[英]XML item is the same as php key word
我有xml項目
<parent>0</parent>
在我的xml文件中。 我需要將其添加到PHP中的變量中,例如
$parent = htmlspecialchars($fce_pridej_polozka_kategorie_xml->parent);
但是parent是PHP的關鍵字,因此該命令不起作用。
怎么辦呢?
這是在父類中嗎? 如果是這樣的話:
//The 'this' keyword references the current object
$this->parent = htmlspecialchars($fce_pridej_polozka_kategorie_xml->parent);
$this->parent = htmlspecialchars($fce_pridej_polozka_kategorie_xml->parent);
if($parent == 0){
$name = substr_replace(htmlspecialchars($fce_pridej_polozka_kategorie_xml -> fieldname), '', 0, 2);
}
else{
$name = htmlspecialchars($fce_pridej_polozka_kategorie_xml -> fieldname);
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.