Skip to content
Advertisement

How to explode csv array in php?

I’m pulling 5 random rows from a csv file such as an image, year, hint text and caption text:

JavaScript

My output which is correct and how I want it:

JavaScript

But I was wondering if it was possible to list each year $data[0] and echo them individually for future use elsewhere? Like explode it or something?

Like:

JavaScript

Advertisement

Answer

just walk through the array

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