0
我從數據庫中獲取複雜的數組,我在每次迭代(循環)中需要像下面的單獨記錄。在PHP中打印多維數組的內容
subscribed_store -> Name
subscribed_companyLogo -> logo image
subscribed_merchant -> Company Name
我們如何簡化以下操作。
/********************** First Iteration *******************/
Array
(
[subscribed_store] => Array
(
[0] => stdClass Object
(
[id] => 55
[name] => test
)
)
[subscribed_companyLogo] => Array
(
[0] => http://test.com/images/logo.png
)
[subscribed_merchant] => Array
(
[0] => stdClass Object
(
[id] => 9
[company_name] => Google
[company_url] => http://www.google.com
[first_name] => David
)
)
)
感謝很多:)
大!但它打印只有一行,我想它的循環。 – Bheem 2013-02-12 10:59:55
好,然後檢查我編輯的答案。我在編輯它。 – ripa 2013-02-12 11:02:00
@Bheem哪部分是動態的? [0] - 這部分? – ripa 2013-02-12 11:05:57