PHP object转array
<?php
function object2array($object)
{
if (is_object($object)) {
foreach ($object as $key => $value) {
$array[$key] = $value;
}
} else {
$array = $object;
}
return $array;
}
?>
当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »