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.

  • Hi @Prince FB, welcome to Magento SE. This will help you, magento.stackexchange.com/questions/203826/… – Ramkishan Suthar Jan 27 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 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.