You are here

function tb_megamenu_array_to_object in The Better Mega Menu 7

File

./tb_megamenu.functions.inc, line 394

Code

function tb_megamenu_array_to_object($array) {
  $obj = new stdClass();
  foreach ($array as $k => $v) {
    if (is_array($v)) {
      $obj->{$k} = tb_megamenu_array_to_object($v);
    }
    else {
      $obj->{$k} = $v;
    }
  }
  return $obj;
}