Forum Moderators: coopster

Message Too Old, No Replies

CSV's

Something simple

         

PSWorx

2:05 pm on Jan 29, 2006 (gmt 0)

10+ Year Member



Can anyone give me a simple example on how to seperate data between a comma seperated value and how to create a dataset with a comma to seperate data

TIA

Sorry for being lazy

milenko1054

2:53 pm on Jan 29, 2006 (gmt 0)

10+ Year Member



Assuming your data is in $array, use implode:

$comma_separated = implode(",", $array);

This creates a string with the values in the array separated by commas.

If you're trying to create an array from a comma separated string, use explode:

$newArray = explode(",", $array);