Skip to content
Advertisement

Undefined index: wc_order_id

I want to export data to excel in CI. But i have issue

JavaScript

If I

JavaScript

the value is correct, only I cannot export to Excel.

This my controller:

JavaScript

Advertisement

Answer

You’re storing the value in $data['data'] which means the variable $data has a key named data that stores the resultant array. So, you can either

  1. loop through $data['data']

    JavaScript
  2. or store resultant array in $data

    JavaScript

See if it helps you.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement