Convert Comma Separated String into Array

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Easy way to turn a CSV file into a parseable array.

<?php
$str="foo,bar,baz,bat";
$arr=explode(",",$str);
// print_r($arr);
?>