title: php get array's data size
body: <p>Having this array:</p>
  
  <pre><code>Array
  (
      [_block1] =&gt; Array
          (
              [list] =&gt; Array
              (
                   [sub-list] =&gt; Array
                   (
                   )
              )
              [links] =&gt; Number
              [total] =&gt; Number
              ...
          )
      [_block2] =&gt; Array
          (
               [@attributes] =&gt; Array
               (
               )
               [title] =&gt; ...
               [data] =&gt; Array ()
               ...
          )
      [_block3] =&gt; Array
          (
               ..
          )
  )
  </code></pre>
  
  <p>Those blocks contain data returned by api. Knowing that each api returns data in a different way/structure I need to measure/calculate the data/size inside of each and one of them and then do <code>if data &gt;  X</code> or &lt; do something.</p>
  
  <p>Is it possible? I have searched google but I only found <code>count()</code> and that isn't what I need to make this work.</p>
  
  <p><strong>Edit:</strong>
  Each and of the those blocks contain many other sub blocks, and I was thinking of calculating the data size in bytes, because count wont do the job here.</p>