php 数组转换成对象实例代码,本程序经过编程之家测试真常运行贴出来的。
- $array = array(1 => php,
- 2 => java,
- 3 => c );
-
- $arrayobject = new ArrayObject($array);
-
- var_dump($arrayobject);
- ?>
-
运行结果:
object(ArrayObject)#1 (1) {
["storage":"ArrayObject":private]=>
array(3) {
[1]=>
string(3) "php"
[2]=>
string(4) "java"
[3]=>
string(3) "c "
}
}
http://www.bkjia.com/PHPjc/486154.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/486154.htmlTechArticlephp 数组转换成对象实例代码,本程序经过编程之家测试真常运行贴出来的。 ?php $array = array(1 = php, 2 = java, 3 = c ); $arrayobject = new ArrayObject($...