<ul class="secondary_menu_tt">
  <?php
  $menu_main = $advancenews['SecondaryMenu'];
  $tt_main_menu_array = json_decode($menu_main, true);
  foreach ($tt_main_menu_array as $tt_ms_item) {
      $tt_c_class_m = isset($tt_ms_item['children']) ? 'has-children' : '';
    ?>
    <li class="nav-item <?php echo $tt_c_class_m ?>">
        <a  target="<?php echo $tt_ms_item['target']  ?>"  href="<?php echo $tt_ms_item['url']  ?>"><?php echo $tt_ms_item['name']  ?></a>
        <?php
        if (isset($tt_ms_item['children'])) {
          ?>
          <ul class="child-menu">
            <?php
            foreach ($tt_ms_item['children'] as $tt_cs_item) {
              ?>
              <li class="child-item">
                <a target="<?php echo $tt_cs_item['target']  ?>" href="<?php echo $tt_cs_item['url']  ?>"><?php echo $tt_cs_item['name']  ?></a>
              </li>
              <?php
            }
             ?>
          </ul>
          <?php
        }
        ?>
    </li>
    <?php
  }
  ?>
</ul>
