脚本宝典收集整理的这篇文章主要介绍了PHP循环遍历stdClass对象的数组,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
array(8){ [ 0 ]=>object(stdClass)#36(1){ [ "color" ]=>string(7)"#a0a0a0" }[ 1 ]=>object(stdClass)#35(1){ [ "color" ]=>string(7)"#e0e0e0" }[ 2 ]=>object(stdClass)#30(1){ [ "color" ]=>string(7)"#f0f0f0" }[ 3 ]=>object(stdClass)#37(1){ [ "color" ]=>string(7)"#f0f0F1" }[ 4 ]=>object(stdClass)#34(1){ [ "color" ]=>string(7)"#404040" }[ 5 ]=>object(stdClass)#38(1){ [ "color" ]=>string(7)"#c0c0c0" }[ 6 ]=>object(stdClass)#39(1){ [ "color" ]=>string(7)"#e06080" }[ 7 ]=>object(stdClass)#40(1){ [ "color" ]=>string(7)"#e06082" } }
我想得到颜色值.如何遍历此对象并将每个十六进制颜色存储在数组中?@H_406_10@
以上是脚本宝典为你收集整理的PHP循环遍历stdClass对象的数组全部内容,希望文章能够帮你解决PHP循环遍历stdClass对象的数组所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。