Jump to content

[SOLVED] How to get the number of the last array chunk?


adx

Recommended Posts

Hey there. I've been ogling this for a little while and have completely lost my mind. The thing is that I want to get the key digit of the last chunk generated by array_chunk. So in the following..

 

Array
(
    [0] => Array
        (
            [0] => a
            [1] => b
        )

    [1] => Array
        (
            [0] => c
            [1] => d
        )

    [2] => Array // I need this number?
        (
            [0] => e
        )

)

 

No matter what I do I can only seem to get b,d,e or one of the three. Array key number 2 seems to fall between the cracks. Can I retrieve this as a numeric value? Thanks!

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.