PHPCMSV9 {loopsubcat (0, 0, 0, $ siteid) $ r} How to explain

Source: Internet
Author: User
PHPCMSV9 {loopsubcat (0, 0, 0, $ siteid) $ r} How to explain? {Loopsubcat (, 0, $ siteid) $ r} {loop} *** get subtopic & nbsp; * @ param $ parentid parent id & nbsp; * @ param $ type topic type & nbsp; * @ param $ self: does PHPCMS V9 {loop subcat (, 0, $ siteid) $ r?

{Loop subcat (0, 0, 0, $ siteid) $ r} {/loop}

/**

* Obtain subtopics
* @ Param $ parentid parent id
* @ Param $ type topic type
* @ Param $ whether self contains itself 0 is not included
* @ Param $ siteid site id
*/
Function subcat ($ parentid = NULL, $ type = NULL, $ self = '0', $ siteid = ''){
If (empty ($ siteid) $ siteid = get_siteid ();
$ Category = getcache ('Category _ content _ '. $ siteid, 'commons ');
Foreach ($ category as $ id => $ cat ){
If ($ cat ['siteid'] = $ siteid & ($ parentid = NULL | $ cat ['parentid'] = $ parentid) & ($ type = NULL | $ cat ['type'] = $ type) $ subcat [$ id] = $ cat;
If ($ self = 1 & $ cat ['catid'] = $ parentid &&! $ Cat ['child ']) $ subcat [$ id] = $ cat;
}
Return $ subcat;
}

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.