object2array

Versions
4.6
object2array($object)

Convert an object to an associative array.

▾ 5 functions call object2array()

comment_edit in modules/comment.module
forum_admin in modules/forum.module
Administration page which allows maintaining forums
taxonomy_admin in modules/taxonomy.module
Menu callback; dispatches to the proper taxonomy administration function.
user_edit in modules/user.module
_blogapi_mt_extra in modules/blogapi.module
Handles extra information sent by clients according to MovableType's spec.

Code

includes/common.inc, line 440

<?php
function object2array($object) {
  if (is_object($object)) {
    foreach ($object as $key => $value) {
      $array[$key] = $value;
    }
  }
  else {
    $array = $object;
  }

  return $array;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.