Parse text file line by line and split each line and store in matrix form.

558fe5180e0e8fc922d31c23ef84d240

data1,true,2000,422
data2,false,2001,421
data3,true,2050,427
data4,true,2004,432
the above data is in sample.txt. I want to write a program using a for loop and any filereader class or by any means, such that my output will be stored in as follows:

My_Data[1]= data1,true,2000,422
My_Data[1][0]= data1
My_Data[1][1]= true
My_Data[1][2]= 2000

My_Data[2]= data2,false,2001,421
My_Data[2][0]= data2
My_Data[2][1]= false
I want to access each My_Data[i] individually and under that My_Data[i][0] ,My_Data[i][1] and so on .

Can anyone please help writing this type of code ?

Identifying a Target Audience for Your WordPress Blog

Fotolia Subscription Monthly 4685447 Xl Stock

Identifying a Target Audience for Your WordPress BlogWhether you’re just starting a new blog or you’re working on your regular weekly content, it’s important to have a clear understanding of who your target audience is. So yes, even if you’ve been writing blog posts up until this point without an audience in mind, there’s no time like the present to figure it […]

The post Identifying a Target Audience for Your WordPress Blog appeared first on WPExplorer.