function csv_to_array

6.x misc.inc csv_to_array($csv_string)
4.x misc.inc csv_to_array($csv_string)
5.x misc.inc csv_to_array($csv_string)

Simple function to split a basic CSV string, trim all elements, then return the resulting array.

File

includes/misc.inc, line 1045
This file contains misc functions for FlightPath

Code

function csv_to_array($csv_string) {
  $temp = explode(",", $csv_string);
  $temp = array_map("trim", $temp);
  return $temp;
}