1
stdClass Object
(
[tip1] => Array
(
[text] => <p>Test text</p>
[format] => 1
)
)
我試圖對象物體的循環與數組在php stdClass中使用變量名訪問數組?
for ($i=1;$i<=10;$i++)
{
echo $fromform->{'tip$i'}['text'];
}
從來沒有做過?
非常感謝你救了我一天, – MMSA 2013-05-13 08:54:35
很高興幫助你:) – Rikesh 2013-05-13 08:56:10