Sunday, 18 August 2013

Split into separate arrarys

Split into separate arrarys

All the split command I have seen split (for example) a csv file into the
1 array.
eg
cat,feline,house,australia
dog,canine,house,america
monkey,primate,zoo,india
Into
array[0] = cat
array[1] = feline
array[2] = house
Is there a way to split them into separate arrays per line so it would be
more like (so you can keep specific attributes in the same lines of the
csv: into
animal[0] = cat
species[0] = feline
lives[0] = house

No comments:

Post a Comment