array(mixed) arr = ({ 0, 0, 0, ({ 20, 0 }), ({ 20, 0 }) });
Now I am trying to get the first value from the first array using
int num = arr[3][0]
In this case you are not getting the first value from the first array
Yes, he is:
array(mixed) arr = ({ 0, 0, 0, ({ 20, 0 }), ({ 40, 0 }) }); arr[3][0];
(1) Result: 20
but the first value (20) from the last element in the array arr (({ 20, 0 })).
arr[4][0];
(2) Result: 40
Now I get the error saying
Expected: int Got: array
What is your Pike version ?
It works for me:
Works for me too (c), with 7.6.9, 7.4.35 and 7.2.556.