I have a list of items from a database being parse in an array
Array ( [0] => Array ( [dToken] => 731fea87ea9dc61f16e93f1ad2b96
To answer the question corresponding to the tile (transform an Array to a list with separator) use the implode function. To generate a CSV I would google php CSV, I'm sure there are already lots of function to do it.
implode
php CSV