get widget number from array dynamically

get widget number from array dynamically

error code: 523