title: Trick for creating breadcrumb menu navigation for tutorial blog
body: <p>Recently i have made a Blog i.e Programming tutorial blog</p>
  
  <p>Can you please give me a logic for creating menu navigation like this:</p>
  
  <p><code>Java &gt;&gt; Frameworks &gt;&gt; Struts2</code></p>
  
  <p><em>What logic i have to use for this?  I am very confused to think, is this logic happens with SQL query?</em></p>
  
  <hr>
  
  <p>I am using : Codeigniter,php,My sql</p>
  
  <p>My database structure is like this:</p>
  
  <pre><code> Table: menu
  ---------------
   id   PK(primary key)
   menu_name     ..... 
   content      longtext
   parent_id    int(key to id)  Foreign key
  </code></pre>
  
  <p>This is an example of the data stored in the table:</p>
  
  <pre><code>Example
  ----------------
  id | menu_name | content | parent_id
  ----------------------------------------
  1  | main 1    | this is main menu 1 | 0                           &lt;-- First level menu
  2  | main 2    | this is main menu 2 | 0                           &lt;-- First level menu  
  3  | submenu 1 | this is main menu 1's first submenu's item 1 | 1  &lt;-- Second level menu
  4  | submenu 1 | this is main menu 1's first submenu's item 2 | 1  &lt;-- Second level menu
  5  | submenu 2 | this is main menu 2's first submenu's item 1 | 2  &lt;-- Second level menu
  6  | submenu 1-1 | this is submenu 1's first submenu's item 1 | 3  &lt;-- Third level menu
  7  | submenu 1-2 | this is submenu 1's first submenu's item 2 | 3  &lt;-- Third level menu
  </code></pre>