PHP gurus, help pls

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • spacemonk
    Confirmed User
    • Jul 2004
    • 969

    #1

    PHP gurus, help pls

    echo array_count_values($r);

    echoes the string "Array" instead the count of the array items
    I sale fu-fme, hit me up for a killer deal!
  • Nookster
    Confirmed IT Professional
    • Nov 2005
    • 3744

    #2
    Need to see rest of code. what is $r consisting of. How are you using it in above commands? etc.
    The Best Affiliate Software, Ever.

    Comment

    • Alky
      Confirmed User
      • Apr 2002
      • 5651

      #3
      echo count($r);

      Comment

      • paterson3713
        Confirmed User
        • Nov 2005
        • 190

        #4
        If you simply want to print out the number of items in an array, use count($r);

        Comment

        • Nookster
          Confirmed IT Professional
          • Nov 2005
          • 3744

          #5
          Originally posted by Alky
          echo count($r);
          Ya, what he/she said.
          The Best Affiliate Software, Ever.

          Comment

          • gornyhuy
            Chafed.
            • May 2002
            • 18041

            #6
            If its just saying "Array" with a capital A, then array_count_values($r); is a function that is returning an array as a value, not a number or a string. Therefore ECHO doesn't know what to do with it.

            icq:159548293

            Comment

            • spacemonk
              Confirmed User
              • Jul 2004
              • 969

              #7
              Cheers guys count did the job
              I sale fu-fme, hit me up for a killer deal!

              Comment

              Working...