Template display problem in thinkphp

Source: Internet
Author: User
I want to output one months of data in the template page (this one months of data when the two-dimensional array, the daily data composition of the one-dimensional array inside), but some days there is no data, I would like to judge on the template page a day no data output, there is the output of the data, one day output corresponding to the day of data, Draw a circle If you don't have the day!
Such as:
Array (1) {["Cao Weihua"]=> Array (+) {["]=>" Array (3) {[0]=> string (+) "2013-04-01 08:00:40" [1]=> string (19) "2013-04-01 16:30:52" ["s"]=> int (1)} ["]=>" Array (3) {[0]=> string () "2013-04-02 08:00:10" [1]=> string (+) "2013-04-02 16:30:52" ["s"]=> int (1)} ["]=>" Array (3) {[0]=> string (+) "2013-04-03 08:02:10" [1]=> s Tring (+) "2013-04-03 16:31:52" ["s"]=> int (1)} ["" "]=> Array (3) {[0]=> string (19)" 2013-04-04 08:01:48 "[1]=& Gt String "2013-04-04 16:36:37" ["s"]=> int (1)} ["" "]=> Array (3) {[0]=> string (19)" 2013-04-07 08:01:48 "[1]= > string "2013-04-07 16:31:08" ["s"]=> int (1)} ["" "]=> Array (3) {[0]=> string (19)" 2013-04-08 08:00:12 " [1]=> string "2013-04-08 16:30:14" ["s"]=> int (1)} ["" "]=> Array (3) {[0]=> string (19)" 2013-04-09 08:0 0:42 "[1]=> string" 2013-04-09 16:30:28 "[" s "]=> int (1)} [10]=> Array (2) {[0]=> string (19)" 2013-04-10 0 8:01:12 "[" s "]=>Int (0)} [11]=> Array (5) {[0]=> string (+) "2013-04-11 08:02:03" [1]=> string "2013-04-11 08:02:03" [2]=> String "2013-04-11 16:30:05" [3]=> string (All) "2013-04-11 16:30:05" ["s"]=> int (1)} [12]=> Array (4) {[0]=& Gt String "2013-04-12 08:00:13" [1]=> string (All) "2013-04-12 08:00:13" [2]=> string "2013-04-12 16:32:21" ["s" ]=> int (1)} [13]=> Array (3) {[0]=> string (+) "2013-04-13 08:05:03" [1]=> string (19) "2013-04-13 16:33:06" [ "S"]=> int (1)} [15]=> Array (3) {[0]=> string (+) "2013-04-15 08:00:49" [1]=> string (19) "2013-04-15 16:30:02 "[" s "]=> int (1)} [16]=> Array (3) {[0]=> string (+)" 2013-04-16 08:03:54 "[1]=> string (19)" 2013-04-16 16:41 : "[" S "]=> int (1)} [17]=> Array (3) {[0]=> string (+)" 2013-04-17 08:03:34 "[1]=> string (19)" 2013-04-17 16 : 44:32 "[" s "]=> int (1)} [18]=> Array (3) {[0]=> string (+)" 2013-04-18 08:00:04 "[1]=> string (19)" 2013-04-18 16:39:05 "[" s "]=> Int (1)} [19]=> Array (2) {[0]=> string (+) "2013-04-19 07:57:08" ["s"]=> int (0)}}}
This is a three-dimensional array, indicating that the Cao Weihua this month has 16 days is data, ["01"] means 1th has data, I want to put this 1th in the template page of the corresponding output; this month 21st no output, I want to put the output of the number 21st a circle! Ask for ideas and key code, thank you!


Reply to discussion (solution)

Try the Volist cycle:



Data
Draw a circle.


Yes, thank you very much!

  • 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.