in reply to Count of element in array - Help
Hi,
This line:
is populating the array with a new element $arr[($ANS-1)] if it doesn't exist. See autovivification.$MMANS=$arr[($ANS-1)][3];
I would suggest validating your input and disallowing a value greater than the number of elements in your array.
Hope this helps!
|
|---|