www.webdeveloper.com
Results 1 to 4 of 4

Thread: Can someone explain this to me please?

  1. #1
    Join Date
    May 2003
    Posts
    33

    Can someone explain this to me please?

    count($lines) = count($R) + count($C)
    foreach($R as $r){
    print count($groups)
    foreach($groups as $group){
    print " "
    print count($group)
    }
    print "\n"
    }
    foreach($C as $c){
    print count($groups)
    foreach($groups as $group){
    print " "
    print count($group)
    }
    print "\n"
    }

  2. #2
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    This would be better posted in the PHP section (since PHP is what it appears to be, though you have decided not to tell us what language you are using).

  3. #3
    Join Date
    Nov 2002
    Location
    Dartmoor [Holiday]
    Posts
    2,382
    Yes, it looks like PHP. The variables $R, $C and $groups are presumably arrays - it would help if you posted the code that creates them. This is a rather complex series of foreach loops, which basically prints out a list of numbers - element counts in the various arrays.

    For more information:
    Count function
    Foreach construct

    Adam

  4. #4
    Join Date
    May 2003
    Posts
    33

    Post moved

    To php forum

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles