Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 504771
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:31:49+00:00 2026-05-13T06:31:49+00:00

The following function out-puts an array and html. I don’t want to have <li><a

  • 0

The following function out-puts an array and html.

I don’t want to have

<li><a href="http://127.0.0.1/ci_okadadesign/index.php/admin/menus/r">r</a></li>

Could anyone tell me how to achive it please?

Function

function getTopMenus(){
     $data[0] = 'root';
     $this->db->where('parentid',0);
     $Q = $this->db->get('menus');
     if ($Q->num_rows() > 0){
       foreach ($Q->result_array() as $row){
         $data[] = $row;
       }
    }
    $Q->free_result();  
    return $data; 
 }

print_r():

Array (
    [0] => Array (
            [id] => 24
            [name] => Main menu
            [shortdesc] => mainmenu
            [status] => active
            [parentid] => 0
        )
    [1] => Array (
            [id] => 25
            [name] => Galleri 1
            [shortdesc] => galleri1
            [status] => active
            [parentid] => 0
        )
)

HTML:

<li><a href="http://127.0.0.1/ci_okadadesign/index.php/admin/menus">menus</a>
  <ul>
    <li><a href="http://127.0.0.1/ci_okadadesign/index.php/admin/menus/r">r</a></li>
    <li><a href="http://127.0.0.1/ci_okadadesign/index.php/admin/menus/mainmenu">Main menu</a></li>
    <li><a href="http://127.0.0.1/ci_okadadesign/index.php/admin/menus/galleri1">Galleri 1</a></li>
  </ul>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:31:49+00:00Added an answer on May 13, 2026 at 6:31 am

    Looks like you have a bunch of menu items defined in your database. If there’s a menu item in there titled ‘r’ all you have to do is delete that row and that <li> will go away.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following two Node.js files: //test.js var hash=require('./hash'); var sys=require('sys'); hash.hash(asdf,function(param){ sys.puts(param);
I'm using the following animation: .wheel1anim { -webkit-animation-name: wheel1go; -webkit-animation-timing-function: ease-in-out; -webkit-animation-iteration-count: 1; -webkit-animation-direction:
Check out the following snippet of HTML/Javascript code: <html> <head> <script type=text/javascript> var alerts
I want a function that searches through my array, and returns all the children
I have the following function, that is called once in my program. When there
I have the following jquery.load() function function updateSecondChart(first, second, third, forth){ $(#test).load(/application/views/public/FactoryData.php?site= + first
I have the following loop that adds an object to an array if certain
I have the following AJAX call: $('#FonykerUsernameRegister').blur(function(){ if($(this).val().length > 2) { alert($(this).val()); $.ajax({ url:
I have the following javascript code: $.get(categories/json_get_cities/ + stateId, function(result) { //code here },
i have the following javascript file named coupon.js - jQuery(document).ready(function(){ jQuery('.appnitro').submit( function() { $.ajax({

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.