Jump to content

count number of rows in an object/array


straygrey

Recommended Posts

In PHP what would be the best method of counting how many rows are contained in the following:-

 

 

object(stdClass)#5 (1) {
    ["GetMediaListResult"] => object(stdClass)#6 (1)
        {
        ["string"] => array(3)
            {
            [0] => string(5) "1.mp4"
            [1] => string(5) "2.mp4"
            [2] => string(5) "3.jpg"
            }
        }
    }

 

obviously the answer is 3 but how to get this in a PHP program?

Link to comment
https://forums.phpfreaks.com/topic/282732-count-number-of-rows-in-an-objectarray/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.