0
        $data = [
            [
                'data_id' => 1,
                'name' => 'Name1',
                'bonus_points' => 123.45
            ],
            [
                'data_id' => 2,
                'name' => 'Name2',
                'bonus_points' => 678.90
            ],
            [
                'data_id' => 3,
                'name' => 'Name3',
                'bonus_points' => 545
            ]
        ];

I want to read below csv file and form exact array $data as given above

enter image description here

Will someone please provide me exact code. I am new to magento.

2
  • Hi @Prince FB, welcome to Magento SE. This will help you, magento.stackexchange.com/questions/203826/… Jan 27, 2019 at 15:23
  • Hi, I have gone through this link and other links. I am able to read the file but not able to create exact array as mentioned in my question. I am new to magento and struggling to do this since last few days. Anyone can provide me code to read above file and create exact array as mentioned above. I have already tried many ways to implement this but no success.
    – Prince FB
    Jan 28, 2019 at 4:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.