Function return array

In reply to lalithjithan:

Follow the example given in stackoverflow