zoukankan      html  css  js  c++  java
  • PHP对象转数组

    function std_class_object_to_array($stdclassobject)
    {
        $_array = is_object($stdclassobject) ? get_object_vars($stdclassobject) : $stdclassobject;
        foreach ($_array as $key => $value) {
            $value = (is_array($value) || is_object($value)) ? std_class_object_to_array($value) : $value;
            $array[$key] = $value;
        }
         return $array;
     }
  • 相关阅读:
    Swift
    Swift
    Swift
    Swift
    Swift
    Swift
    Swift
    Swift
    Swift
    算法の序列
  • 原文地址:https://www.cnblogs.com/xiondun/p/12931470.html
Copyright © 2011-2022 走看看