摘要:
<?php$name = 'Today 3? , very/ cold';$name = strtolower($name);//$name = preg_replace('/[^a-z0-9\s]/','',$name);$name = preg_replace('/[\.\s+\?,\/"]/','_',$name); //change spacesecho $name;?>其中$name = preg_replace('/[\.\s+\?,\/"]/',' 阅读全文
摘要:
一次性读取csv文件内所有行的数据<?php $file = fopen('windows_2011_s.csv','r'); while ($data = fgetcsv($file)) { //每次读取CSV里面的一行内容//print_r($data); //此为一个数组,要获得每一个数据,访问数组下标即可$goods_list[] = $data; }//print_r($goods_list);/* foreach ($goods_list as $arr){ if ($arr[0]!=""){ echo $arr[0].&q 阅读全文