Php cloud tag implementation code

Source: Internet
Author: User
Php cloud tag implementation code
I would like to share with you a php cloud tag code, which is very popular now. For more information, see.

In today's php websites, a large number of applications of cloud tags make the pages take effect and interesting, and also increase the indexing and retrieval of related content. This section describes the php cloud tag implementation code. if you are interested, you can study it.

1. css code


    

2. php cloud tag display

40, 'tagname' => 'tutorial', 'URL' => 'http: // bbs.it-home.org/tutorials/'), array ('weight' => 12, 'tagname' => 'examples ', 'URL' => 'http: // bbs.it-home.org/examples/'), array ('weight' => 10, 'tagname' => 'Contact ', 'URL' => 'http: // bbs.it-home.org/contact/'), array ('weight' => 15, 'tagname' => 'quotes ', 'URL' => 'http: // bbs.it-home.org/quotes/'), array ('weight' => 28, 'tagname' => 'devel ', 'URL' => 'http: // bbs. it-ho Me.org/phpdev/'), array ('weight' => 35, 'tagname' => 'manual', 'URL' => 'http: // bbs.it-home.org/en/index.html '), array ('weight' => 20, 'tagname' => 'article', 'URL' => 'http: // bbs.it-home.org/articles /'),); /*** create a new tag cloud object ***/$ tagCloud = new tagCloud ($ tags); echo $ tagCloud-> displayTagCloud ();?>

TagsArray = $ tags;}/***** Display tag cloud ** @ access public ** @ return string **/public function displayTagCloud () {$ ret = ''; shuffle ($ this-> tagsArray); foreach ($ this-> tagsArray as $ tag) {$ ret. = ''. $ tag ['tagname']. ''. "\ n";} return $ ret;}/*** end of class ***/?>

Php cloud tag demo effect, such:

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.