将逗号分隔的字符串转换为数组

Avatar of Chris Coyier
Chris Coyier

轻松将CSV文件转换为可解析的数组。

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