Breadcrumbs navigation problems. Distress

Source: Internet
Author: User
For example, to publish an article that belongs to Category B. A message is automatically inserted into the database.


When I look at my article, how do I get the page to show breadcrumb navigation? as follows, I am a super novice, a lot of knock is not very clear, please advise.

Home >> Category A >> category B


Reply to discussion (solution)

/*select catid, Upid, the CatName from classification table performs a $a than the read array.  is an array of */$a = array ('  catid ' + 1, ' upid ' = = 0, ' catname ' = ' a '),  array (' catid ' = 2, ' Upid ' = 1, ' catname ' = ' B '), $a = find_parent ($a, ' catid ', ' upid '); $res = Array (); $p =& $a [2]; The current article belongs to the category while ($p) {  array_unshift ($res, $p [' catname ']);  if (! isset ($p [' parent '])) break;  $p =& $p [' Parent '] [$p [' Upid '];} echo Join (' >> ', $res);

function Find_parent See http://bbs.csdn.net/topics/370094009
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.