数码资讯
PHP的print_rJavascript函数输出JSON数据
复制代码代码如下所示: / / theob(JSON数据) 功能print_r(theobj){ 无功retstr =; 如果(typeof theobj = = 'object){ retstr + =; 对于(VAR P theobj){ 如果(typeof theobj { p } = = '
选购提示
关注价格、性能、续航、售后和真实使用场景,理性比较后再下单。
复制代码代码如下所示:
/ / theob(JSON数据)
功能print_r(theobj){
无功retstr =;
如果(typeof theobj = = 'object){
retstr + =;
对于(VAR P theobj){
如果(typeof theobj { p } = = 'object){
retstr ={+ P + } = > +类型+(theobj);
retstr + = + +(P print_r theobj { });
{ { { }
retstr ={+ P + P + theobj } { } += >;
}
}
retstr + =;
}
返回retstr;
}
/ / theob(JSON数据)
功能print_r(theobj){
无功retstr =;
如果(typeof theobj = = 'object){
retstr + =;
对于(VAR P theobj){
如果(typeof theobj { p } = = 'object){
retstr ={+ P + } = > +类型+(theobj);
retstr + = + +(P print_r theobj { });
{ { { }
retstr ={+ P + P + theobj } { } += >;
}
}
retstr + =;
}
返回retstr;
}
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。