在面向?qū)ο缶幊讨?,如何在php中的類內(nèi)回顯數(shù)據(jù)?這是我正在編寫的以下代碼,如果它是正確的。每當(dāng)我回顯它時(shí),我就會(huì)遇到錯(cuò)誤并且意外出現(xiàn)'$ name'期望函數(shù):class person{ $name; $email;}$person1-> new person;$person1-> $name='Eliot';echo $person1->$name;
我對(duì)訪問php中的類以在OOP中回顯數(shù)據(jù)感興趣嗎?
慕標(biāo)琳琳
2021-05-05 13:09:00