I'm not sure I understand what error you are trying to point out, but based on what Doc posted, doing a len on a array is not going to work.

If you want to count the number of items in your array, it would be ubound($array), and if you want the length of an item in the array, it would be len($array)[0], len($array)[1], etc.